Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 996 Bytes

README.md

File metadata and controls

54 lines (44 loc) · 996 Bytes

GitHub release GitHub license Crates.io

csv2json

Turns a CSV into a JSON file

Installation:

$ cargo install csv2json

Usage:

$ 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"
  }
]