Just-In-Time JSON.parse compiler that optimizes parsing by schema sampling. Version 1.0.0 is stable. It samples incoming JSON data and if a stable schema is detected, compiles a fast parser using turbo-json-parse. Differentiators: JIT compilation based on runtime schema analysis, supports Node.js buffers for faster parsing. Maintained by mafintosh. Release cadence is low; no recent updates.
npm install jitsonNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates JIT compilation: after several parses with a stable schema, parse.schema becomes non-null.
Call jitson() directly (const parse = jitson()).
Pass JSON.stringify output to parse, not JSON.parse output.
Fall back to JSON.parse manually if jitson throws.
Create one jitson instance per API endpoint or data source.
const parse = jitson(); // No 'new' keyword
Call parse() at least once before checking parse.schema. After schema stabilization it will be an object.
Simplify the JSON data structure or fall back to JSON.parse.