Turns a CSV into a JSON file
$ cargo install csv2json
$ csv2json --in <csv file> > <json file>
If your CSV contains multidimensional data, you can add use the dimensional separator argument -d
Eg:
name.first,name.last,age
Daniel,Mason,not telling
Without using the separator:
[
{
"age": "not telling",
"name.first": "Daniel",
"name.last": "Mason"
}
]
Setting the separator -d .
:
[
{
"name": {
"first": "Daniel",
"last": "Mason"
},
"age": "not telling"
}
]