0.1.8 • Published 10 years ago

json-fix-stream v0.1.8

Weekly downloads
28
License
-
Repository
github
Last release
10 years ago

json-fix-stream

Fix malformed JSON stream

Install :hammer:

npm install json-fix-stream

Usage :bulb:

attandance.json

{"name":"joe", "city":"Portland", "comment":"this is great"}
{"name":"trouble", "city":"Near You", "comment":"i like to add
newlines in my
comments"}
split         = new require('split')("}\n") // parse json with newlines in attributes
jsonFixStream = new require('json-fix-stream') // fix the nixed } at the end of each line
inStream      = require('fs').createReadStream('attandance.json')
inStream.pipe(split).pipe(fix).pipe(process.stdout) // each record is sucessfully parsed and output

Contributions :muscle:

:smile: Feedback, problem reports, enhancement requests are welcome.

:up: Example code are better.

:cool: Pull requests are best.

License

MIT

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago