jsonc-parser
npmv3.3.1TypeScriptScanner and parser for JSON with comments.
Adopt with care
jsonc-parser is usable, with caveats. Last published 807 days ago. 2 releases in the last 2 years.
- AAdoption: grade A, Excellent.
65.2M downloads per week and 1 known dependents.
- DMaintenance: grade D, Poor — a real concern.
Last published 807 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 208 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 7 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding jsonc-parser to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the jsonc-parser README.
/**
* Creates a JSON scanner on the given text.
* If ignoreTrivia is set, whitespaces or comments are ignored.
*/
export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner;
/**
* The scanner object, representing a JSON scanner at a position in the input string.
*/
export interface JSONScanner {
/**
* Sets the scan position to a new offset. A call to 'scan' is needed to get the first token.
*/
setPosition(pos: number): any;Dependencies
Declared by jsonc-parser v3.3.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (8)
Used by
Popular packages that depend on jsonc-parser.
Relationship graph
Dependencies (left) and dependents (right) of jsonc-parser.
Frequently installed together
Find and load configuration from a package.json property, rc file, TypeScript module, and more!
Next generation testing framework powered by Vite
Runtime typescript and ESM support for Node.js
A minimal library for executing processes in Node
TypeScript definitions for node
Release history
2 releases in the last two years, typically about 74 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.0.0-next.2 | 2 months ago | 110 KB | MIT |
| 4.0.0-next.1 | 6 months ago | 110 KB | MIT |
| 3.3.1latest | 2 years ago | 208 KB | MIT |
| 3.3.0 | 2 years ago | 208 KB | MIT |
| 3.2.1 | 2 years ago | 205 KB | MIT |
| 3.2.0 | 4 years ago | 201 KB | MIT |
| 3.1.0 | 4 years ago | 187 KB | MIT |
| 3.0.0 | 5 years ago | 167 KB | MIT |
| 2.3.1 | 6 years ago | 166 KB | MIT |
| 2.3.0 | 6 years ago | 167 KB | MIT |
| 2.2.1 | 6 years ago | 162 KB | MIT |
| 2.2.0 | 6 years ago | 162 KB | MIT |
| 2.1.1 | 7 years ago | 171 KB | MIT |
| 2.1.0 | 7 years ago | 171 KB | MIT |
| 2.0.3 | 7 years ago | 167 KB | MIT |
Overview
jsonc-parser is an npm package that scanner and parser for JSON with comments. It is extremely widely used, with about 65.2M downloads per week and 1 known dependents in the graph. The latest version is 3.3.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need scanner and parser for JSON with comments and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (65.2M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use jsonc-parser?
jsonc-parser is usable, with caveats. Last published 807 days ago. 2 releases in the last 2 years.
How do I install jsonc-parser?
Run `npm install jsonc-parser` to add jsonc-parser to your npm project.
What license is jsonc-parser released under?
jsonc-parser is distributed under the MIT license.
How popular is jsonc-parser?
jsonc-parser has approximately 65,174,980 downloads per week and 1 known dependent packages.
Is jsonc-parser still maintained?
The most recent release of jsonc-parser (v3.3.1) was published 2 years ago.
Does jsonc-parser run install scripts?
No. jsonc-parser does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.