
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
python3 -m pip install csv-to-custom-json
Coverage is 100%
# install
python -m pip install coverage unittest
# only test
python -m unittest
# coverage
coverage run -m unittest && coverage report -m
Just import the function and use it !
from csv_to_custom_json import parseFile
result = parseFile("myfile.csv")
Create a schema variable and put it as second parameter !
Example with a simple csv
:
num1,num2,num3
1,2,3
4,5,6
7,8,9
from csv_to_custom_json import parseFile
def callback(value):
return None
schema = {
"num1": "string",
"num2": callback,
"num3": "int"
}
result = parseFile("myfile.csv", schema)
Caption :
- ad you can see the schema can contains function, or string with the type
- the values with type will be parsed
- attribute of the object are the word in the first line of the csv
It's the same as a simple schema :
from csv_to_custom_json import parseFile
schema = {
"obj1": {
"obj2": {
"num4": "string"
}
},
"num2": "",
"num3": ""
}
result = parseFile("myfile.csv", schema)
If you want to check some real case, check out the folder test
in the GitHub repository
If you want to see and use options check that documentation: How-to-options
Licensed under the MIT License - LICENSE
FAQs
Easily convert your CSV to custom JSON
We found that csv-to-custom-json demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.