npm / @discoveryjs/json-ext
@discoveryjs/json-ext
What changed in @discoveryjs/json-ext 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking8 new APIs and options1 performance2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@discoveryjs/json-ext 112 changes
Breaking changes 1
When onRootValue is specified, returns the number of processed root values instead of collecting and returning parsed values.
New APIs and options 8
The state passed to onChunk and onRootValue callbacks now includes returnValue and currentRootValue properties.
Internal TypeScript types, including options and public function return types, are now exposed as part of the public API.
Adds JSONL mode for parsing multiple newline-separated JSON values from a stream; supported modes are json, jsonl, and auto.
Adds an onChunk option for progress tracking.
Adds a callback for incremental stream processing that is called with each parsed root value.
Adds JSON.parse()-like reviver support as a second argument or in the options object.
Adds jsonl mode to serialize iterable input into newline-delimited JSON values; json remains the default.
Adds jsonl mode to compute byte size for newline-delimited JSON values; json remains the default.
Performance 1
The function-based implementation is smaller and faster than the previous class-based implementation.
Fixes and other changes 2
Fixes an out-of-memory issue on very long arrays, including corner cases with millions of elements.
Fixes various issues when parsing malformed JSON.