Fork Notes
- Updates all dependencies
- Promises to stay maintained and responsive to PRs
All thanks to the original maintainer Max Ogden.
ndjson-next
streaming newline delimited json parser + serializer. Available as a JS API or a command line tool
usage
var ndjson = require('ndjson-next')
ndjson.parse(opts)
returns a transform stream that accepts newline delimited json and emits objects
example newline delimited json:
data.txt
:
{"foo": "bar"}
{"hello": "world"}
If you want to discard non-valid JSON messages, you can call ndjson.parse({strict: false})
usage:
fs
ndjson.serialize() / ndjson.stringify()
returns a transform stream that accepts json objects and emits newline delimited json
example usage:
var serialize = ndjsonserializeserializeserialize
license
BSD-3-Clause