json-test-suite provides a programmatic interface to the `JSONTestSuite` data, specifically designed for testing JSON parsers. This package, currently at version 1.0.0, extracts the diverse set of JSON test cases into easily consumable JavaScript objects. It includes both valid and invalid JSON strings, along with examples designed to stress-test various aspects of JSON parsing, such as large numbers, specific character encodings, and edge cases. Its release cadence appears to be stable, with 1.0.0 being the initial significant release. Key differentiators include its direct consumption of the `nst/JSONTestSuite` data, making it a reliable source for parser validation without manual data management, and its provision of TypeScript types for improved developer experience. It primarily focuses on data delivery rather than providing a parsing implementation.
npm install json-test-suiteVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and access the `parsing` and `transform` test suites, and provides an example of using the 'parsing' data with `JSON.parse`.
Ensure you have a JSON parser available in your environment and explicitly use it to process the `input` property of the test cases (e.g., `JSON.parse(testCase.input)`).
Ensure your project's `package.json` includes `'type': 'module'` to enable ES modules, or use a bundler (like Webpack, Rollup, Parcel) that can transpile ES module syntax for CommonJS targets. Alternatively, if strictly in CommonJS and `import` is not an option, consider dynamic `import()` for specific scenarios.
No dependency data recorded yet.