</>PackageGraphPackageGraph

jsonc-parser

npmv3.3.1TypeScript

Scanner 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

208 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.

typescriptFull 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;
Example truncated — see the full README.

Dependencies

Declared by jsonc-parser v3.3.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (8)

@types/mocha ^10.0.7@types/node ^18.x@typescript-eslint/eslint-plugin ^7.13.1@typescript-eslint/parser ^7.13.1eslint ^8.57.0mocha ^10.4.0rimraf ^5.0.7typescript ^5.4.2

Used by

Popular packages that depend on jsonc-parser.

Relationship graph

Dependencies (left) and dependents (right) of jsonc-parser.

@oxlint-config-in…jsonc-parser
jsonc-parser dependencies dependents

Frequently installed together

Release history

2 releases in the last two years, typically about 74 days apart.

Recent versions of jsonc-parser
VersionPublishedSizeLicense
4.0.0-next.22 months ago110 KBMIT
4.0.0-next.16 months ago110 KBMIT
3.3.1latest2 years ago208 KBMIT
3.3.02 years ago208 KBMIT
3.2.12 years ago205 KBMIT
3.2.04 years ago201 KBMIT
3.1.04 years ago187 KBMIT
3.0.05 years ago167 KBMIT
2.3.16 years ago166 KBMIT
2.3.06 years ago167 KBMIT
2.2.16 years ago162 KBMIT
2.2.06 years ago162 KBMIT
2.1.17 years ago171 KBMIT
2.1.07 years ago171 KBMIT
2.0.37 years ago167 KBMIT

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.

Maintainers

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.