parse-json
npmv8.3.0TypeScriptParse JSON with more helpful errors
Adopt with care
parse-json is usable, with caveats. Last published 518 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 518 days ago. 2 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 6 transitive packages, about 669 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- 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 parse-json 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.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing parse-json, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=18
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the parse-json README.
import parseJson, {JSONError} from 'parse-json';
const json = '{\n\t"foo": true,\n}';
JSON.parse(json);
/*
SyntaxError: Expected double-quoted property name in JSON at position 16 (line 3 column 1)
*/
parseJson(json);
/*
JSONError: Expected double-quoted property name in JSON at position 16 (line 3 column 1)parse-json vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| parse-jsonthis page | 0 | 2 | MIT | 1 year ago |
| pg-connection-string | 38.9M | 2 | MIT | 1 day ago |
| query-string | 22.1M | 3 | MIT | 1 day ago |
| strnum | 0 | 1 | MIT | 1 day ago |
| strip-json-comments | 0 | 2 | MIT | 1 day ago |
| non-error | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by parse-json v8.3.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (6)
Used by
Popular packages that depend on parse-json.
Relationship graph
Dependencies (left) and dependents (right) of parse-json.
Frequently installed together
TypeScript execution environment and REPL for node.js, with source map support
Transpile JSX, TypeScript and esnext features on the fly with esbuild
TypeScript definitions for node
An extremely fast JavaScript and CSS bundler and minifier.
This packages is a collection of utilities and helper functions
Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.
No description provided.
This package contains shared types of Jest's packages.
A drop-in replacement for fs, making various improvements.
Convert Windows backslash paths to slash paths
`@jest/pattern` is a helper library for the jest library that implements the logic for parsing and matching patterns.
The semantic version parser used by npm.
Release history
2 releases in the last two years, typically about 56 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 8.3.0latest | 1 year ago | 11 KB | MIT |
| 8.2.0 | 1 year ago | 11 KB | MIT |
| 8.1.0 | 2 years ago | 9.3 KB | MIT |
| 8.0.1 | 2 years ago | 9.1 KB | MIT |
| 8.0.0 | 2 years ago | 8.8 KB | MIT |
| 7.1.1 | 2 years ago | 8.5 KB | MIT |
| 7.1.0 | 3 years ago | 8.2 KB | MIT |
| 7.0.0 | 3 years ago | 7.9 KB | MIT |
| 6.0.2 | 4 years ago | 5.3 KB | MIT |
| 6.0.1 | 4 years ago | 5.3 KB | MIT |
| 6.0.0 | 4 years ago | 5.4 KB | MIT |
| 5.2.0 | 5 years ago | 5.3 KB | MIT |
| 5.1.0 | 6 years ago | 5.0 KB | MIT |
| 5.0.1 | 6 years ago | 5.0 KB | MIT |
| 5.0.0 | 7 years ago | 4.9 KB | MIT |
Overview
parse-json is an npm package that parse JSON with more helpful errors. It has 2 known dependents in the graph. The latest version is 8.3.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need parse JSON with more helpful errors and value a focused 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
- 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
Funding
Frequently asked questions
Should I use parse-json?
parse-json is usable, with caveats. Last published 518 days ago. 2 releases in the last 2 years.
How do I install parse-json?
Run `npm install parse-json` to add parse-json to your npm project.
How many dependencies does parse-json have?
parse-json declares 9 direct dependencies and pulls in 6 packages in total once its runtime tree is resolved totalling about 669 KB on disk.
What license is parse-json released under?
parse-json is distributed under the MIT license. Its dependency tree also includes: (MIT OR CC0-1.0), MIT.
How popular is parse-json?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on parse-json.
Is parse-json still maintained?
The most recent release of parse-json (v8.3.0) was published 1 year ago.
Does parse-json run install scripts?
No. parse-json does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.