ndjson-2-json

1.0.2 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i ndjson-2-json

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

2.84 kB

Total Files

3

Last publish

Collaborators

  • maxlath