1.0.2 • Published 2 years ago

ndjson-2-json v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

ndjson-2-json

Minimal CLI converter from newline-delimited JSON to a JSON array

Features:

  • converts NDJSON to JSON
  • uses streams to be able to handle very large files with minimal memory use
  • zero validation: you have the responsability to send some proper newline-delimited JSON on ndjson-2-json stdin

Install

npm i -g ndjson-2-json

How to

# Convert all a file
cat some.ndjson | ndjson-2-json > some.json
# which can also be written
ndjson-2-json < some.ndjson > some.json

# Convert just the 20 first lines
head -n 20 some.ndjson | ndjson-2-json > 20_first_entries.json

See also

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

4 years ago