@cacheplane/partial-json
v0.1.1
Published
Streaming partial-JSON parser with identity preservation, push/pull APIs, JSON Pointer lookups, and structural-sharing materialization.
Downloads
287
Maintainers
Readme
@cacheplane/partial-json
Streaming partial-JSON parser. Returns a structured AST as bytes arrive, preserves object identity across mutations, and supports both pull-style (create / push / finish / resolve) and push-style (createPartialJsonParser with events) APIs.
Install
npm install @cacheplane/partial-jsonQuick start
import { createPartialJsonParser, materialize } from '@cacheplane/partial-json';
const parser = createPartialJsonParser();
parser.push('{"items":[{"id":"a"},');
parser.push('{"id":"b"}]}');
const node = parser.getByPath('/items/1/id');
const value = materialize(parser.root);API
See full documentation at https://github.com/cacheplane/partial-json
