A simple, fast, and cross-platform CLI tool to convert CSV data to JSON, written in Go.
- Convert CSV to a JSON array.
- Reads from a file or
stdin. - Single binary, no external dependencies.
- Cross-platform support (macOS amd64/arm64, Linux amd64/arm64, Windows amd64).
- Go to the Releases page.
- Download the appropriate archive for your operating system and architecture (e.g.,
csv-to-json-v1.0.2-darwin-arm64.zip). - Extract the archive.
- Move the
csv-to-jsonbinary to a directory in your$PATH(e.g.,/usr/local/binon macOS/Linux).
Provide a path to a CSV file as an argument:
csv-to-json data.csv > output.jsonPipe data directly to the command:
cat data.csv | csv-to-json > output.json-
-v,--version: Print the version information.$ csv-to-json --version csv-to-json version v0.1.0
- Go (1.18 or later)
- Make
- Git
-
Clone the repository:
git clone https://github.com/nlink-jp/csv-to-json.git cd csv-to-json -
Create a git tag to embed version info (optional, defaults to commit hash):
git tag v0.1.0
-
Run
maketo build binaries and archives:# Cross-compile for all platforms and create .zip archives make package # Or, to build just for your local machine make build
The build artifacts will be located in the
dist/directory.