Soul is a CLI tool written in Go that transforms csv files into Json.
$ ./soul [options] <csvFilePath>
Example:
$ ./soul data.csv
The command above will create a data.json
file at exactly the same dir location of data.csv
- pretty: If enabled, it will create a well-formatted JSON file instead of a compact one.
- separator: to indicate which character is used to separate cells. Only accepted options are
comma
(default) orsemicolon
.
Example using options:
$ ./soul --pretty --separator=semicolon data.csv
The command above will create a formatted data.json
file at exactly the same dir location of data.csv
The row columns from this file are separated using semicolons instead of commas.
If you want to generate an executable for your platform, just run the following command, this tool is written using only standard lib packages, so no aditional installs are required.
$ go build
TDD was used to develop this utility, if you want to run the tests by yourself just run the following command:
go run