{"id":15069872,"url":"https://github.com/fireblinkltd/json-streaming-reader","last_synced_at":"2026-01-18T10:28:06.435Z","repository":{"id":57285303,"uuid":"169276436","full_name":"FireBlinkLTD/json-streaming-reader","owner":"FireBlinkLTD","description":"Line delimited and concatenated JSON streaming protocol reader.","archived":false,"fork":false,"pushed_at":"2020-04-04T08:47:28.000Z","size":3689,"stargazers_count":2,"open_issues_count":20,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T07:09:50.628Z","etag":null,"topics":["concatenated","delimited","fireblink","json","line","node","node-js","node-module","node-modules","npm","parser","protocol","reader","stream","streaming"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/json-streaming-reader","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FireBlinkLTD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-05T16:51:48.000Z","updated_at":"2023-12-07T08:00:33.000Z","dependencies_parsed_at":"2022-09-19T21:18:04.793Z","dependency_job_id":null,"html_url":"https://github.com/FireBlinkLTD/json-streaming-reader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireBlinkLTD%2Fjson-streaming-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireBlinkLTD%2Fjson-streaming-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireBlinkLTD%2Fjson-streaming-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireBlinkLTD%2Fjson-streaming-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FireBlinkLTD","download_url":"https://codeload.github.com/FireBlinkLTD/json-streaming-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299844,"owners_count":20916192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concatenated","delimited","fireblink","json","line","node","node-js","node-module","node-modules","npm","parser","protocol","reader","stream","streaming"],"created_at":"2024-09-25T01:45:15.883Z","updated_at":"2025-04-05T07:09:55.656Z","avatar_url":"https://github.com/FireBlinkLTD.png","language":"TypeScript","readme":"# JSON Streaming Protocol Reader\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/FireBlinkLTD/json-streaming-reader.svg)](https://greenkeeper.io/)\n[![CircleCI](https://circleci.com/gh/FireBlinkLTD/json-streaming-reader.svg?style=svg)](https://circleci.com/gh/FireBlinkLTD/json-streaming-reader)\n[![codecov](https://codecov.io/gh/FireBlinkLTD/json-streaming-reader/branch/master/graph/badge.svg)](https://codecov.io/gh/FireBlinkLTD/json-streaming-reader)\n\nSimple [JSON streaming](https://en.wikipedia.org/wiki/JSON_streaming) protocol parser that allows to handle each record individually.\n\n## Supported Stream Types\n\n### [Line-delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON)\n\nFully supported.\n\n### [Concatenated JSON](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON#Concatenated_JSON)\n\nSupported for non-primitive types. Only objects, arrays and their combination as records are supported.\n\nSo, following string value will be parsed correctly:\n\n```\n{a: 1}[213]\n```\n\nwhile next will not:\n\n```\n{a: 1}null\"string\"123\n```\n\n### [Record separator-delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON#Record_separator-delimited_JSON)\n\nNot supported.\n\n### [Length-prefixed JSON](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON#Length-prefixed_JSON)\n\nNot supported.\n\n## Usage\n\nIf you use NPM:\n\n```bash\nnpm i --save json-streaming-reader\n```\n\nIf you use YARN:\n\n```bash\nyarn add json-streaming-reader\n```\n\nThen just import `JsonStream` like this:\n\n```typescript\n// if you use JavaScript:\nconst JsonStreamReader = require('json-streaming-reader').JsonStreamReader;\n\n// or if you use TypeScript:\nimport {JsonStreamReader} from 'json-streaming-reader'\n```\n\nAnd pipe the reading stream to it like this:\n\n```javascript\nconst jsonStream = new JsonStreamReader();\nreadStream.pipe(jsonStream);\n\njsonStream.on('data', (data) =\u003e {\n    // do something with the record\n    // NOTE: `data` is an object with single field `record` that hosts actual value.\n    const {record} = data.record;\n    \n    console.log(record);\n});\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblinkltd%2Fjson-streaming-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireblinkltd%2Fjson-streaming-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblinkltd%2Fjson-streaming-reader/lists"}