Criticism and Limits of JSON5

What critics have said about JSON5, who said it, and what is fair to say back.

A reference page that only praises its subject is advertising. This one collects the real objections: a downgrade to JSON that loses values, an engineer's case against unquoted strings, no parser built into Node.js or browsers, slow library parsers, a confusing name, no registered media type, years between releases, comments lost on save, and one security advisory.

Each section gives the objection, its source, the strongest reply, and the situations where it matters. Every quote was checked against its source, and every number was measured or looked up on November 29, 2026.

A brass balance scale on a desk weighing JSON5 objections against replies, with printed index cards beside it

TL;DR: Most objections are true and most are narrow. JSON5 loses information when you convert it to JSON, parses much slower than JSON.parse, has no built-in parser in Node.js or browsers, no registered media type and no release of the reference library since December 2022. None of that matters for a config file that a program reads once. It matters when you ship the format over a network, parse it in a hot loop, or need a library fix soon.

Checklist icon

The Objections at a Glance

Encyclopedias separate what critics claim from what is established. The table does the same: the third column says whether the claim still holds as of November 29, 2026, and the fourth says when it should change a decision.

ObjectionRaised byStill true todayMatters when
Converting to JSON loses valuesNigel Tao, 2021Yes, by designYour output goes to a JSON consumer
Unquoted strings are a mistakeNigel Tao, 2021A matter of taste; keys only hereYou must pick one human-friendly format
No native parserNode.js maintainers, 2022Yes for Node.js and browsers; no for Bun, Swift and SQLiteYou want zero dependencies
Parsing is slowLibrary authorsYes: about 34x to 51x slower than JSON.parse in our testsLarge files or hot loops
The name implies a JSON versionIssue reporters, 2018 and 2019YesYou explain the format to others
No registered media typeIssue reporters, 2013 to 2016YesHTTP content negotiation
Releases are rareObservationYes: the reference library last shipped 2.2.3 in December 2022You need a fix promptly
Comments are lost on saveIssue reporters, 2018 onwardYes, in the reference libraryA program edits a human-written file
Security flawCVE-2022-46175Fixed in 2.2.2 and 1.0.2An old copy sits in your dependency tree
Convert icon

Criticism: Downgrading to JSON Loses Information

The criticism. Nigel Tao, introducing JWCC in February 2021, argued that JSON is the common wire format for APIs and that a superset should convert back to it cleanly. In his words: "Downgrading JWCC to JSON is trivial. Downgrading e.g. JSON5 to JSON is not. There is no obvious unambiguous mapping from a JSON5 NaN to JSON."

What happens. Parsing is lossless for values, but the standard serializer cannot write three of them. This run used json5 2.2.3 on Node.js 24.22.1:

const text = `{ // retries retries: 0x10, backoff: .5, maxWait: Infinity, ratio: NaN, mask: 0xFF00, }`; const value = JSON5.parse(text); JSON.stringify(value); // {"retries":16,"backoff":0.5,"maxWait":null,"ratio":null,"mask":65280} JSON5.stringify(value, null, 2); // { // retries: 16, // backoff: 0.5, // maxWait: Infinity, // ratio: NaN, // mask: 65280, // }

Three things were lost in the JSON line. Infinity and NaN became null, with no error. The comment disappeared. The hexadecimal literals became decimal, so the bitmask 0xFF00 turned into 65280. Native JSON.parse rejects the unconverted forms: JSON.parse('[NaN]') throws SyntaxError: Unexpected token 'N', "[NaN]" is not valid JSON.

The fair response. Three points. First, the loss is the price of the feature: the format exists so people can write Infinity and 0xFF00, and a JSON number has no way to say either. Second, the damage is limited to a small set of values. Strings, booleans, null, arrays, objects and every finite number survive as values. Third, JSON itself is not clean at the edges. Python's json.dumps([float('nan'), float('inf')]) writes [NaN, Infinity], which is not valid JSON and which JavaScript rejects, so the problem existed before the format did. The data types page lists every value.

When it matters. When JSON5 text is the source of truth and a program must hand the same data to a strict JSON consumer. Check for non-finite numbers before converting, or avoid them in files you plan to downgrade. SQLite makes the same trade openly: its documentation says generated text "will always be strictly conforming to the canonical definition of JSON", and that it reads NaN as an alternative spelling of null.

Quote icon

Criticism: Unquoted Strings Are a Mistake

The criticism, quoted accurately. The same article by Nigel Tao is the most cited critique, and it is easy to misreport. It never uses the phrase "unquoted keys". Its target is unquoted strings, which JSON5 does not allow in value position. His FAQ asks "Why not JSON5, JSONC #1, HJSON or HOCON instead?" and answers: "I think unquoted strings are a mistake."

His reasons are about ambiguity and room to grow. Allowing unquoted strings, he writes, "re-defining undefined or datetime without quotes" would rule out a future extension that adds new keywords. He also prefers typos to fail early: a mistyped flase should be a syntax error, instead of "silently accepted (as a string, not a bool)", which is dangerous in weakly typed languages where any non-empty string is truthy. The same FAQ concedes the other side: "if you like e.g. JSON5 then use JSON5."

What the reference parser does. Only keys may drop their quotes, and only when they are ECMAScript identifiers. Values still need quotes:

InputResult with json5 2.2.3
{a:flase}SyntaxError: invalid character 'l' at 1:5
{a:foo}SyntaxError: invalid character 'o' at 1:5
{my-key:1}SyntaxError: invalid character '-' at 1:4
{1:1}SyntaxError: invalid character '1' at 1:2
{undefined:1,null:2,true:3,while:6}Parses: four keys named undefined, null, true and while

The fair response. The typo he worries about fails in JSON5, as the first two rows show, so his strongest example does not apply. Reserving keywords is also moot for keys, because a key position never holds a keyword value. The same objection was voiced inside the JSON5 community: in a 2019 discussion of rival formats, a contributor called unquoted strings "syntactically ambiguous" and "foreign to ES5 from which JSON5 borrows", and ended with "Please, no." What remains is a judgment call that Tao did not make about unquoted keys specifically: that any relaxation of quoting makes files harder to read at a glance. Reasonable people differ.

When it matters. When your files are read by people who know strict JSON, or by tools that highlight JSON. A file such as {my-key:1} is rejected, which surprises writers who assume "no quotes" means any text. The Hjson comparison tests what quoteless values do to real input, and the JWCC comparison covers the commas-and-comments alternative Tao proposed.

Node.js logo

Criticism: No Built-In Parser in Node.js or Browsers

The criticism. JSON works everywhere with one line, JSON.parse. JSON5 needs a dependency in JavaScript. A 2021 feature request asked Node.js for first-class support, mainly so that package.json could carry comments. A maintainer closed it on January 28, 2022: "In my view, adding JSON5 support for package.json in Node.js isn't going to happen any time in the foreseeable future, and probably never." Another participant had already summed up the cost: tools such as npm that rewrite JSON files would have to preserve comments.

What we checked. On Node.js 24.22.1, require('node:json5') fails with ERR_UNKNOWN_BUILTIN_MODULE and there is no global JSON5. In the JSON modules proposal for ECMAScript, the "Support JSON5" issue is open with no decision, and the specification repository's issue asking whether to propose JSON5 to ECMAScript is also open. Its founder replied there that he would be "very grateful" to anyone who led that effort.

The fair response. Other platforms did build it in:

PlatformSupportSource
SQLite logoSQLiteReads JSON5 input since version 3.42.0 (2023-05-16); writes JSON onlySQLite JSON documentation
Apple platforms logoApple FoundationJSONDecoder.allowsJSON5, from iOS 15 and macOS 12Apple developer documentation
Bun logoBunBun.JSON5.parse and stringify; documented as passing "100% of the official JSON5 test suite"Bun documentation
Node.js logoNode.js and browsersNoneNode.js issue 40714; our check

The library is also small. In the 2.2.3 package, dist/index.min.js is 31,631 bytes, or 9,508 bytes gzipped, and it has no dependencies.

When it matters. In a browser bundle where every kilobyte counts, in a script that must run with nothing installed, and in any file that Node.js itself must read, such as package.json. For everything else, one import is a small cost. See the Node.js guide and the implementations list.

Performance icon

Criticism: Library Parsers Are Slow

The criticism. JSON.parse is native code inside the JavaScript engine, and every JSON5 parser is ordinary library code. The loudest statement comes from a library author. The README of the pure-Python json5 package says it "has been reasonably well-tested, but it is SLOW. It can be 1000-6000x slower than the C-optimized JSON module, and is 200x slower (or more) than the pure Python JSON module."

Measured figures. This site measured the parsers on November 25, 2026: on the comparison page, JSON5.parse took 0.71 ms against 0.02 ms for a 2.8 KB config, 37.7 ms against 0.83 ms for a 142 KB data file, and 336 ms against 10.2 ms for 1.4 MB, which is 33x to 45x slower. On the Python page, json5 0.17.3 needed 40 ms for the 2.8 KB file and 1,841 ms for the 142 KB file, while the compiled pyjson5 2.0.1 needed 0.06 ms and 3.3 ms.

We re-measured the JavaScript side on November 29, 2026 with a fresh data set of generated records, parsing JSON5 text with json5 2.2.3 and JSON text with JSON.parse (Node.js 24.22.1, Intel Core i9-9900, Windows 11, median of 31 to 1,001 runs after warm-up):

Input sizeJSON.parsejson5 2.2.3Ratio
3.4 KB (12 records)0.01 ms0.34 msabout 34x
170 KB (600 records)0.47 ms18 msabout 39x
1.7 MB (6,000 records)5.0 ms196 to 255 ms across two runsabout 39x to 51x

The fair response. The slowdown is real and so is the context. A config file read once at startup costs a third of a millisecond. The ratio depends on record shape: a second set of smaller generated records gave about 21x to 24x. The slowest case above, 1.7 MB, is machine-generated data that has no business being in a human-edited format. Faster parsers exist: in our run json-6 1.1.7, a different JSON5-compatible parser, took 0.07 ms, 3.7 to 4.0 ms and 39 to 42 ms on the same three inputs (see JSON5 vs JSON6). The reference library's unreleased changelog also lists parser speedups and a stringify that is about 1.5x faster, though they are not in a release yet.

When it matters. Large inputs, and any parse inside a request path or loop. The rule of thumb on the performance tutorial applies: parse once, cache the result, and use JSON for bulk data.

Hashtag icon

Criticism: The Name Suggests a Version of JSON

The criticism. In July 2019 a user opened an issue in the specification repository titled "Potential confusion with standard JSON specification". It begins: "The name 'JSON5' is potentially confusing. People may think that this is the 5th version of the JSON specification". The reporter also objected that JSON's author is named in the project's credits although he had no part in it. A 2018 issue titled "Where has JSON4 gone / Why JSON5?" showed the confusion in the wild. In 2019 another contributor asked why a number was in the name at all, pointing out that PHP eventually dropped version numbers from its file extensions.

The fair response. The maintainers answered both. On the first question: "The 5 in JSON5 isn't so much a version number as it is an indication of what features it includes, namely, several features from ECMAScript 5." On the second, a maintainer wrote that "JSON5 syntax will never go beyond the syntax of ES5", so users know exactly which feature set a library supports. The specification's own abstract is modest: it calls JSON5 "a proposed extension to JSON". The credits section of the current README says only that JSON's state machine diagrams gave the authors "motivation and confidence"; it does not claim his involvement. An independent format named JSON6 also exists. It is not a successor issued by this project (see JSON5 vs JSON6).

When it matters. When you introduce the format to colleagues or write documentation. Say "JSON5 is an ES5-based superset of JSON, maintained separately from JSON", not "the next version of JSON". The history page and the design rationale explain where the name came from.

Document icon

Criticism: No Registered Media Type or Standard

The criticism. A web server or client identifies a payload by its media type, and JSON5 does not have an official one. The specification text contains no media type section. We downloaded the IANA application media type registry on November 29, 2026: it lists application/json, application/toml and application/yaml, and has no entry for JSON5 or JSONC. The most widely shared convention, application/json5 with the extension .json5, appears in the mime-db 1.54.0 database but without a registration source.

The history. Users raised this in 2013, 2014 and 2016 (issues 40, 80 and 123 in the reference repository). In 2013 the founder said either application/json5 or a vnd. type was fine; in 2014 a participant concluded that application/json5 was the way to go; and a maintainer replied "LGTM" to the 2016 request in September 2017. We found no registration filed with IANA. Two broader requests, to submit the format as an internet standard (October 2021) and as a proposal to the committee that standardizes ECMAScript (July 2022), are still open. On the second, a maintainer said he was open to contacting Ecma if the founder agreed, and the founder replied that he had no experience with standards bodies and would follow the maintainer's lead.

The fair response. Config files are found by file name, not by media type, so the gap rarely shows up in practice. TOML and YAML did register theirs, which proves the path exists. See standards status for what exactly has and has not been standardized.

When it matters. When JSON5 crosses HTTP, a message queue or any system that routes on type. Prefer JSON on the wire and keep JSON5 for files, or document the type you chose.

Time icon

Criticism: Releases and Spec Updates Are Rare

The facts. The npm registry lists these releases of the reference library: 2.2.0 (February 1, 2021), 2.2.1 (March 21, 2022), 2.2.2 (December 16, 2022), 1.0.2 (December 30, 2022) and 2.2.3 (December 31, 2022). The latest tag is still 2.2.3 on November 29, 2026, nearly four years later. The specification, version 1.0.0, is dated March 2018; its repository's last commit, a README link fix, is from May 2023, and it has 16 open issues.

Promises and drift. In February 2022 the maintainer wrote that he planned to release version 3 "after April", and that it "will mostly include performance improvements and refactors". That release has not shipped. In April 2020 the same maintainer had set the library's role: "In an effort to keep JSON5 simple, this library will be a reference parser rather than a full-featured, production-ready implementation of a JSON5 parser."

The fair response. Two. The format is meant to be stable: asked in 2016 whether the format would ever be finalized, the founder answered that the project had not "shaken the boat with things like dates in all these years", so it was "probably unlikely that we will at this point either". And the library is not dormant. The repository's main branch has 39 commits after the 2.2.3 tag, 37 of them between October 15 and October 29, 2026. Its changelog lists, under an Unreleased heading, an ES-modules-only package for Node.js 22.12 and later, a stringify that throws on BigInt instead of silently dropping it, an opt-in bigint parse option, and fixes that align reviver and error-position behavior with JSON.parse. There is no release date.

When it matters. When you need a bug fixed in a published version, or a corporate policy that rejects packages without recent releases. Pin the version, test against the official suite (see conformance), and read the open spec questions to see what is undecided.

Comment icon

Criticism: Comments Do Not Survive a Round Trip

The criticism. Comments are the reason many teams adopt the format, yet the reference library throws them away. An issue opened in July 2018, "Options for preserving comments when editing a JSON5 file by script", asked for a way to change one value and write the file back untouched. The maintainer replied that the library would stay a reference parser. A commenter wrote in October 2025 that the parser understands comments but the writer has no option to produce them. The demonstration is the same code as above: stringify printed no comment, and wrote retries: 16 where the file said 0x10.

The fair response. A parser that returns plain objects has nowhere to put a comment, so this follows from the design and is not a bug. Tools that edit in place exist; they just are not the reference library:

ToolLanguageVersionWhat it keeps
json-fivePython1.1.2Comments and whitespace, round trip
@croct/json5-parserJavaScript0.2.2, December 2025Indentation, spacing and comments ("lossless")
golden-fleeceJavaScript1.0.9, June 2018Patch function that edits a JSON5 string

When it matters. When a script updates a file that a person maintains, such as bumping a version number. Do not load, change and dump it with the reference library; use an editing parser, or restrict the script to files nobody comments. The Python page covers json-five and the module-name clash, and the comments tutorial covers writing good ones.

Security icon

Security History

The record. The reference library has one published advisory: CVE-2022-46175, a prototype pollution flaw. The GitHub advisory (GHSA-9c47-m6qq-7p4h) says parse did not restrict keys named __proto__, so crafted text could add inherited properties to the returned object. It affects versions below 1.0.2 and from 2.0.0 up to but not including 2.2.2. GitHub rated it 7.1 (High) and NVD 8.8 (High); both classify it as CWE-1321. We queried the GitHub Advisory Database on November 29, 2026: it lists no other advisory for the npm package, and none for the PyPI packages json5, pyjson5 and json-five.

The fair response. The advisory itself states that the flaw "pollutes the prototype of the object returned by JSON5.parse and not the global Object prototype", so other objects were not affected, although the impact depends on how the returned object is used. The fix was released in both major lines. The format never executes input, which is the risk behind eval-based parsers. And the bug class is common: a newer parser with the same mistake is documented in JSON5 vs JSON6.

When it matters. When you parse untrusted text, or when a dependency such as a build tool pins an old copy. Run npm ls json5 to see every resolved copy. The security tutorial gives the complete checklist.

List icon

Smaller Limits Worth Knowing

These objections have not produced a famous article, but they appear in the specification tracker or in our tests.

LimitDetailEvidence
Duplicate keysThe specification says the behavior "is unpredictable"; implementations may keep the last, fail or report all. The reference parser keeps the last, and an open spec issue asks for a defined rule.Spec, section on objects; spec issue 38
Numbers are doubles9007199254740993 parses to 9007199254740992, exactly as in JSON.parse. A BigInt option exists on the unreleased main branch.Our test; spec issue 36; unreleased changelog
No dates or binary dataValues are strings, numbers, booleans, null, arrays and objects. Encoding conventions for dates and binary data are open questions.Spec issues 4 and 35
Frozen at ECMAScript 5.1No template strings, no undefined, no numeric separators. A 2024 issue asks to go past ES 5.1; that is the gap JSON6 fills.Spec issue 56
Silent BigInt dropIn 2.2.3, JSON5.stringify({b: 1n}) returns {}, where JSON.stringify throws.Our test; unreleased changelog

The open questions page goes through each unresolved item in the tracker.

Common Questions

What is the strongest argument against JSON5?

Fragmentation. Several formats extend JSON in different ways, and none is a standard. A file that one tool reads may fail in another. Choose by what the tools that must read the file accept, not by features.

Is JSON5 abandoned?

No, but it is slow-moving. The last published release was December 2022, the specification dates from 2018, and the repository received 37 commits in two weeks of October 2026. For adoption, see who uses it.

Should I use it on a public API?

Almost never. Use JSON for data exchange, where every parser behaves the same way, and JSON5 for files that people edit. The security tutorial explains the same advice.

Is the format unsafe?

No. It is data, never executed. The one advisory concerned a library bug that was fixed in 2022, and keeping dependencies current covers it.

Are there alternatives without these objections?

Each has its own. JSONC and JWCC only add comments and commas, YAML and TOML leave the JSON family. See the comparison for the trade-offs.

Do these objections apply to other languages?

The speed and release points differ by library: a compiled Python parser stayed within about 1.6x of the standard library in our tests. The name, media type and conversion points apply to the format itself.