Crates.io | csv2jsonl |
lib.rs | csv2jsonl |
version | 0.3.0 |
source | src |
created_at | 2022-02-20 21:34:34.202492 |
updated_at | 2022-02-20 21:34:34.202492 |
description | Converts CSV to JSON Lines |
homepage | https://github.com/bwbroersma/csv2jsonl/ |
repository | https://github.com/bwbroersma/csv2jsonl/ |
max_upload_size | |
id | 535989 |
size | 17,010 |
csv2jsonl (c2j) converts CSV to JSON Lines.
By default csv2json will stream and perform type interferance without information loss. Number strings are only converted to numbers if they are equal to the JSON string (not contain e, E or a long floating point value). If a UTF-8 or UTF-16 BOM is detected, then an appropriate encoding is automatically detected and transcoding is performed. In all other cases, the source of the underlying reader is passed through unchanged as if it were UTF-8.
$ c2j [OPTIONS] [FILE]
ARGS:
<FILE> The CSV file to operate on. If omitted, will accept input as piped data via STDIN
OPTIONS:
-d, --delimiter <DELIMITER> Delimiting character (single byte) of the CSV [default: ,]
-t, --tabs Use a tab delimiter (overrides delimiter option)
-i, --indent <INDENT> Indent the output JSON this many spaces. Disabled by default
-I, --no-inference Disable type inference when parsing CSV. Do not convert empty
strings to null and number string to numbers
-h, --help Print help information
-V, --version Print version information
I started looking for a fast rust version of csvjson of the csvkit. I initially found csv_to_json, streaming but not properly reading csv. And csv2json which was using csv, but no stream. After altering the package a lot, I thought it would be best to create a new one instead of a fork.