
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
json-parse-stream
Advanced tools
emits elements of a json document as they're available. similar to JSONStream, but emits everything instead of a specified path.
var fs = require('fs')
, parse = require('json-parse-stream')
fs.createReadStream('package.json')
.pipe(parse())
.on('data', function(element) {
console.log(element)
})
/* truncated output:
...
{ type: 'string'
, value: 'json-parse-stream'
, key: 'name'
, parent: [parent object] }
...
*/
parse() instances are readable/writable streams.
their data events take the following form:
{ type: ['object', 'array', 'string', 'number', 'null', 'boolean']
, value: <the value represented at this node>
, key: "the key from the parent to this element" | undefined (for root objects)
, parent: <the parent node> }
you will get events for elements in order of most specific to least specific.
JSONParse is awesome, but the requirement of providing a path function precludes you from asking for multiple paths at once.
As a bonus, the output of
json-parse-streamwill make it easy to write a wrapper for CSSauron for querying.
MIT
FAQs
streaming json parser
The npm package json-parse-stream receives a total of 7 weekly downloads. As such, json-parse-stream popularity was classified as not popular.
We found that json-parse-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.