fast-json-stringify builds a fast JSON `stringify()` function from a JSON Schema (Draft 7), useful when you want faster serialization for small payloads than `JSON.stringify()`. It supports common JSON types and nested schemas, with special handling for values like `Date`, `RegExp`, and `BigInt`, and it is built to generate functions ahead of time using the provided schema.
A status summary will appear after the next weekly refresh.
Recent updates
v7.0.1
v7.0.1 is primarily a set of maintenance and bug fixes, including a fix for valid JSON serialization of schema `const` string values and a fix for stray comma generation in certain object schemas. It also bumps `fast-uri` to v4.0.0 and updates Dependabot scheduling/config, plus small README and docs link corrections.
v7.0.0
Release v7.0.0 removes the deprecated `debugMode` option from fast-json-stringify. The tests and TypeScript typings are updated to use `mode: 'debug'` instead.
Breakingv6.4.0
v6.4.0 focuses on maintenance work (CI/tooling updates), improved benchmark/test coverage, and a functional fix around how external $ref schemas are handled. The notable functional change is a fix intended to extract reusable serializer logic for non-recursive external $ref schemas, reducing duplicated inlining.
v6.3.0
v6.3.0 focuses on performance improvements in the generated JSON stringifiers, plus a fix/feature for handling tuple-like schemas with item $ref. The release notes also include dev and benchmark maintenance changes, including the tinybench upgrade and updating benchmark format labels.
v6.2.0
v6.2.0 focuses on performance improvements (serializer codegen refactors, monomorphic variables, and reduced comma handling) and CI/benchmarking changes. It also updates the custom Ajv keyword fjs_type validation to recognize values that implement a toJSON method. Release notes do not mention any user-facing behavior changes around object schema features like additionalProperties or recursive schema handling.