# What changed in @discoveryjs/json-ext

> 12 changes in @discoveryjs/json-ext 1 from its official release notes, upgrade guides and advisories: 1 breaking, 8 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@discoveryjs/json-ext/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @discoveryjs/json-ext 1

### Breaking changes

- When onRootValue is specified, returns the number of processed root values instead of collecting and returning parsed values. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)

### New APIs and options

- The state passed to onChunk and onRootValue callbacks now includes returnValue and currentRootValue properties. (1.1.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.1.0)
- Internal TypeScript types, including options and public function return types, are now exposed as part of the public API. (1.1.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.1.0)
- Adds JSONL mode for parsing multiple newline-separated JSON values from a stream; supported modes are json, jsonl, and auto. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Adds an onChunk option for progress tracking. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Adds a callback for incremental stream processing that is called with each parsed root value. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Adds JSON.parse()-like reviver support as a second argument or in the options object. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Adds jsonl mode to serialize iterable input into newline-delimited JSON values; json remains the default. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Adds jsonl mode to compute byte size for newline-delimited JSON values; json remains the default. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)

### Performance

- The function-based implementation is smaller and faster than the previous class-based implementation. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)

### Fixes and other changes

- Fixes an out-of-memory issue on very long arrays, including corner cases with millions of elements. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
- Fixes various issues when parsing malformed JSON. (1.0.0) — [release notes](https://github.com/discoveryjs/json-ext/releases/tag/v1.0.0)
