Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 2.47 KB

File metadata and controls

57 lines (37 loc) · 2.47 KB

jsonl

Convert newline-delimited JSON (JSONL/NDJSON) to CSV. See tojsonl command to convert CSV to JSONL.

Table of Contents | Source: src/cmd/jsonl.rs | 🚀🔣

Description | Usage | JSONL Options | Common Options

Description

Convert newline-delimited JSON (JSONL/NDJSON) to CSV.

The command tries to do its best but since it is not possible to straightforwardly convert JSON lines to CSV, the process might lose some complex fields from the input.

Also, it will fail if the JSON documents are not consistent with one another, as the first JSON line will be used to infer the headers of the CSV output.

For examples, see https://github.com/dathere/qsv/blob/master/tests/test_jsonl.rs.

Usage

qsv jsonl [options] [<input>]
qsv jsonl --help

JSONL Options

     Option       Type Description Default
 ‑‑ignore‑errors  flag Skip malformed input lines.
 ‑j,
‑‑jobs 
string The number of jobs to run in parallel. When not set, the number of jobs is set to the number of CPUs detected.
 ‑b,
‑‑batch 
string The number of rows per batch to load into memory, before running in parallel. Set to 0 to load all rows in one batch. 50000

Common Options

     Option      Type Description Default
 ‑h,
‑‑help 
flag Display this message
 ‑o,
‑‑output 
string Write output to instead of stdout.
 ‑d,
‑‑delimiter 
string The delimiter to use when writing CSV data. Must be a single character. ,

Source: src/cmd/jsonl.rs | Table of Contents | README