csvkitHow to convert a csv file to json with csvkit?
csvkit is a suite of command-line tools for converting to and working with CSV, the king of tabular file formats. It can be used to convert a csv file to json.
Example code
csvjson input.csv > output.json
Output example
{
"name": "John Doe",
"age": "30",
"city": "New York"
}
Code explanation
- csvjson: This is the command used to convert a csv file to json.
- input.csv: This is the name of the csv file that needs to be converted.
- output.json: This is the name of the json file that will be created after the conversion.
Helpful links
More of Csvkit
- How to use csvkit on Windows?
- How to update specific records using csvkit?
- How to convert a tsv file to csv with csvkit?
- How to merge columns with csvkit?
- How to change the encoding in csvkit?
- How to remove header with csvkit?
- How to install csvkit on Archlinux?
- How to add a header to a CSV file using csvkit?
- How to fetch unique values with csvkit?
- How to convert a csv file to tab delimited with csvkit?
See more codes...