{"maintainers":[{"name":"anonymous","email":"linus@folkdatorn.se"}],"dist-tags":{"latest":"0.1.1"},"author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"description":"Parse [JSONLines](http://jsonlines.org) with Node.js.","readme":"# JSONLines for Node.js\n\nParse [JSONLines](http://jsonlines.org) with Node.js.\n\n## Installation\n\n```sh\nnpm install --save jsonlines\n```\n\n## Usage\n\n```javascript\nvar jsonlines = require('jsonlines')\nvar parser = jsonlines.parse()\n\nparser.on('data', function (data) {\n  console.log('Got json:', data)\n})\n\nparser.on('end', function () {\n  console.log('No more data')\n})\n\nparser.write('{ \"test\": \"This is a test!\" }\\n')\nparser.write('{ \"jsonlines\": \"is awesome\" }')\nparser.end()\n```\n\n```javascript\nvar jsonlines = require('jsonlines')\nvar stringifier = jsonlines.stringify()\n\nstringifier.pipe(process.stdout)\n\nstringifier.write({ test: 'This is a test!' })\nstringifier.write({ jsonlines: 'is awesome' })\nstringifier.end()\n```\n\n## API\n\n### `.parse([options])`\n\nReturns a transform stream that turns newline separated json into a stream of\njavascript values.\n\n`options` is an optional object with the keys documented below.\n\n### `.stringify()`\n\nReturns a transform stream that turns javascript values into a stream of newline\nseparated json.\n\n## Options\n\n### `emitInvalidLine`\n\nIf true, instead of emitting an error and cancelling the stream when an invalid line is proccessed, an `invalid-line` event is emitted with the same error. This is very useful when processing text that have mixed plain text and json data.\n\nExample:\n\n```js\nvar jsonlines = require('jsonlines')\nvar parser = jsonlines.parse({ emitInvalidLines: true })\n\nparser.on('data', function (data) {\n  console.log('Got json:', data)\n})\n\nparser.on('invalid-line', function (err) {\n  console.log('Got text:', err.source)\n})\n\nparser.write('{ \"test\": \"This is a test!\" }\\n')\nparser.write('This is some plain text\\n')\nparser.write('{ \"jsonlines\": \"is awesome\" }')\nparser.end()\n```\n\nOutput:\n\n```text\nGot json: { test: 'This is a test!' }\nGot text: This is some plain text\nGot json: { jsonlines: 'is awesome' }\n```\n","repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/node-jsonlines.git"},"users":{"mutoo":true},"bugs":{"url":"https://github.com/LinusU/node-jsonlines/issues"},"license":"MIT","versions":{"0.1.0":{"name":"jsonlines","version":"0.1.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/node-jsonlines.git"},"scripts":{"test":"standard && mocha"},"devDependencies":{"concat-stream":"^1.5.0","mocha":"^2.2.5","standard":"^5.0.2"},"gitHead":"7a0332a879610fcf60bf31d09b4043c033ae8135","description":"Parse [JSONLines](http://jsonlines.org) with Node.js.","bugs":{"url":"https://github.com/LinusU/node-jsonlines/issues"},"homepage":"https://github.com/LinusU/node-jsonlines#readme","_id":"jsonlines@0.1.0","_shasum":"0a2c55f0e2f3d453fd9786d9814acca0791a949d","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"anonymous","email":"linus@folkdatorn.se"},"maintainers":[{"name":"anonymous","email":"linus@folkdatorn.se"}],"dist":{"shasum":"0a2c55f0e2f3d453fd9786d9814acca0791a949d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/jsonlines/-/jsonlines-0.1.0.tgz","integrity":"sha512-DStk7WsS/RgQkTWJChTxX/7crsHMNJgmLQvYuTQC3otAfBQ/1X8Bw8vmMXKYxNwSSePD50S0AFGSxmSrZXOW0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbneBl8WlIR77x9H6HBmViX2Y9CtX/RE8XJwV7ORk8wAiEAiU6Rvu2r67m9Vglt6cAdmrbFuBAL929TBtNm1u/F5w0="}]}},"0.1.1":{"name":"jsonlines","version":"0.1.1","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/node-jsonlines.git"},"scripts":{"test":"standard && mocha"},"devDependencies":{"concat-stream":"^1.5.0","mocha":"^2.2.5","standard":"^5.0.2"},"gitHead":"61eb1a0eb68c59e1fd705985a43401c2fe8d7660","description":"Parse [JSONLines](http://jsonlines.org) with Node.js.","bugs":{"url":"https://github.com/LinusU/node-jsonlines/issues"},"homepage":"https://github.com/LinusU/node-jsonlines#readme","_id":"jsonlines@0.1.1","_shasum":"4fcd246dc5d0e38691907c44ab002f782d1d94cc","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"anonymous","email":"linus@folkdatorn.se"},"dist":{"shasum":"4fcd246dc5d0e38691907c44ab002f782d1d94cc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/jsonlines/-/jsonlines-0.1.1.tgz","integrity":"sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5iwtL9cwAN42WVe/xn64bWiQFd6LL60qaD4X2uoX+LAiA4f1dADMV8F4uKuaW1QOtuFeakM2JAZBiLR6jM1YW9zA=="}]},"maintainers":[{"name":"anonymous","email":"linus@folkdatorn.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsonlines-0.1.1.tgz_1497453671336_0.1522504109889269"}}},"name":"jsonlines","time":{"modified":"2022-06-19T06:39:34.637Z","created":"2015-08-10T20:11:16.020Z","0.1.0":"2015-08-10T20:11:16.020Z","0.1.1":"2017-06-14T15:21:12.311Z"},"readmeFilename":"README.md","homepage":"https://github.com/LinusU/node-jsonlines#readme"}