Spec Open Questions
Every unresolved issue in the specification repository, in plain English, with what parsers do in the meantime.
The JSON5 1.0.0 specification dates from March 2018, and 16 issues were open against it on November 29, 2026: duplicate keys, lone surrogates, number wording, newer ECMAScript syntax and more.
Each entry here states the question, reports what maintainers actually wrote, and demonstrates the current behavior with the reference parser. A summary table gives issue number, topic, state and last activity.
TL;DR: Sixteen spec issues are open and none has changed the published text. Duplicate keys, lone surrogates, huge numbers and missing date, binary and BigInt conventions are where parsers or producers can diverge. Several others ask only for clearer wording of rules the grammar already settles.
All 16 Open Issues
The list below was read from the GitHub API for json5/json5-spec on November 29, 2026: every issue in the open state, with its comments. The repository reported 16 open items, which matches these 16 issues. "Last activity" is the date GitHub gives for the most recent update. For scale, the newest commit on the master branch is a link fix dated May 15, 2023, and the published specification is still version 1.0.0 of March 2018.
| Issue | Topic | State | Last activity |
|---|---|---|---|
| #58 | State that a leading 0 in decimal numbers is illegal | Open | 2025-10-10 |
| #56 | Upgrade past ECMAScript 5.1 | Open | 2025-02-07 |
| #44 | Gather parsers under one GitHub organization | Open | 2022-10-24 |
| #43 | Make the format part of ECMAScript | Open | 2022-09-29 |
| #42 | Add ES2015 \u{...} escapes | Open | 2022-09-30 |
| #38 | Define duplicate-name behavior | Open | 2022-09-15 |
| #37 | Submit the format to TC39 as a versioning proposal | Open | 2022-08-01 |
| #36 | Recommend BigInt support | Open | 2022-09-26 |
| #35 | Recommend an encoding for binary data | Open | 2025-05-09 |
| #33 | Submit the format as an internet standard | Open | 2021-10-10 |
| #28 | Wording on leading and trailing decimal points | Open | 2020-05-30 |
| #25 | Clarify uniqueness of property names | Open | 2020-05-13 |
| #24 | Implementation limits on NaN and Infinity | Open | 2020-05-15 |
| #12 | Recommend avoiding invalid surrogate pairs | Open | 2022-04-18 |
| #6 | Clarify the meaning of hexadecimal values | Open | 2020-05-13 |
| #4 | Recommend RFC 3339 for dates in strings | Open | 2022-10-24 |
Seven of the 16 (#4, #6, #12, #24, #25, #28 and #35) are assigned to the repository's v1.1.0 milestone, which was open with no due date on November 29, 2026. The other nine have no milestone. Assignment shows that an item was considered for a revision, not that its proposal was accepted.
An open issue is a request, not a rule. Nothing proposed here is part of the format. Where this page shows behavior, it is what libraries do today.
Behavior was observed with Node.js 24.22.1 and the reference library json5 2.2.3, the latest npm release. Where the unreleased main branch (commit 6d21f2f) behaves differently, it is labeled "main". Python results use Python 3.14.4 with json5 0.17.3, pyjson5 2.0.1 and json-five 1.1.2. Parser pass rates are on the conformance page.
Duplicate Keys (Issue #38)
Section 3 of the spec says names within an object should be unique. It then states that behavior with repeated names is unpredictable, and that an implementation may report the last pair only, report an error, or report all pairs. So three incompatible results are all permitted.
#38, opened in July 2022, proposes naming the behaviors (unique, last-value-wins, duplicate and undefined), requiring every implementation to support unique (reject duplicates) and recommending it as the choice. After other commenters questioned the undefined case, the author restated the idea: unique support would be mandatory, other behaviors optional, and anything outside the named set "non-standard". The author cites I-JSON (RFC 7493), which forbids duplicate member names outright.
Maintainer Jordan Tucker replied that a new "must" would instantly make existing implementations non-compliant, the reference library included. He explained that the library keeps the last value because it followed the ECMAScript 5 parsing steps, said this is probably not the best behavior, and welcomed an opt-in unique option that might become the default in a version 3. Neither the 2.2.3 release nor the main branch README documents such an option. The thread also notes that ES5 strict mode rejected duplicate properties and that ES2015 dropped the restriction when computed property names arrived.
JSON5.parse('{a: 1, a: 2}') // { a: 2 }
JSON.parse('{"a":1,"a":2}') // { a: 2 }
// A reviver runs after the merge, so it sees "a" only once
const seen = [];
JSON5.parse('{a:1,a:2}', (k, v) => (seen.push(k), v));
console.log(seen); // [ 'a', '' ]If duplicates must be an error today, the Python json5 package has a switch for it:
>>> import json5
>>> json5.loads('{a:1,a:2}')
{'a': 2}
>>> json5.loads('{a:1,a:2}', allow_duplicate_keys=False)
ValueError: Duplicate key "a" found in objectIs a quoted name the same name? (Issue #25)
#25 asks whether an unquoted identifier is only shorthand for a string. The maintainer answered in May 2020 that abc, 'abc', "abc" and a spelling made of \x escapes are all variations of one name, and that the spec should say so. The text has not been updated. The reference parser already behaves that way:
| Input | Result |
|---|---|
{a: 1, "a": 2} | {a: 2} |
{abc: 1, '\x61\x62\x63': 2} | {abc: 2} |
{a: 1, \u0061: 2} | {a: 2} |
Invalid Surrogate Pairs (Issue #12)
Characters above U+FFFF are written in escapes as two UTF-16 code units, a surrogate pair. The grammar also lets you write one half alone, such as "\uDEAD", which does not encode any Unicode character. #12 (March 2019) asks the spec to address it. The reporter noted that ES2015 keeps a lone unit as a code point of the same value, and the maintainer pointed to section 8.2 of RFC 8259, which warns that such strings behave unpredictably.
In May 2020 the maintainer concluded that banning lone surrogates would break compatibility with JSON, whose grammar allows them, but that a recommendation to avoid them would be reasonable. Later comments from April 2022 argue for byte-preserving behavior for file names that are not valid Unicode. The maintainer observed that a \xHH escape can never produce a surrogate and asked for the byte-oriented API request to be moved elsewhere. I-JSON takes the strict position and forbids surrogates.
| Check (json5 2.2.3 on Node.js 24) | Result |
|---|---|
JSON5.parse('"\\uDEAD"') | Accepted; a string of length 1 |
.isWellFormed() on that string | false |
UTF-8 bytes from Buffer.from | EF BF BD, the replacement character: the original unit is lost |
| Reversed pair (low half first) | Accepted unchanged |
JSON.stringify of the string | Escapes it as \udead |
JSON5.stringify, 2.2.3 | Writes the lone unit raw between quotes |
stringify, main | Escapes it as \udead |
Python libraries disagree
The same split appears more sharply in Python, where even a valid pair is handled two ways. The input is the 12 characters \uD83D\uDE00 inside quotes, which stands for one code point, U+1F600.
| Library | Valid pair | Lone \uDEAD |
|---|---|---|
Standard json | One code point (length 1) | Accepted |
pyjson5 2.0.1 | One code point (length 1) | Raises Json5IllegalCharacter |
json5 0.17.3 | Two surrogate code points (length 2) | Accepted |
json-five 1.1.2 | Two surrogate code points (length 2) | Accepted |
With the two-unit result, calling .encode('utf-8') raises UnicodeEncodeError. Writing the character directly in the document, instead of as escapes, avoids the question. See encoding troubleshooting.
Leading Zeros (Issue #58)
#58, the newest open issue (October 2025), comes from a parser author: the spec never says in words that 01 is illegal, although the reference parser rejects it. The maintainer agreed a sentence could help, and explained that the rule is already in the grammar. The path runs from JSON5Number to the ES5 DecimalIntegerLiteral, which is either a single 0 or a non-zero digit followed by more digits. A 0 followed by 1 is therefore two tokens in a row, which no syntax rule allows.
The reporter replied that relying on ECMAScript productions makes it hard to tell which prose is normative, and that the resulting message is confusing. Sloppy-mode JavaScript reads some of these texts as numbers, which is why an eval-based "parser" gets them wrong.
| Text | json5 2.2.3 | JavaScript sloppy mode |
|---|---|---|
01 | invalid character '1' at 1:2 | 1 (legacy octal) |
010 | invalid character '1' at 1:2 | 8 |
08 | invalid character '8' at 1:2 | 8 |
00.5 | invalid character '0' at 1:2 | Syntax error |
-012 | invalid character '1' at 1:3 | -10 |
0.5, 0e1 | 0.5, 0 | Same values |
Not every library agrees: in our test run, jju 1.4.0 accepted leading-zero input as octal. Remove leading zeros, and quote identifiers such as ZIP codes as strings.
Decimal point wording (Issue #28)
#28 points at a contradiction in prose. The summary says numbers may have a leading or trailing decimal point, but section 6 says a fraction part is a decimal point followed by one or more digits, which would exclude 5.. The grammar settles it through ES5: either side of the point may be empty, not both. The reporter also asked the text to say that hexadecimal numbers have no fraction or exponent. In May 2020 the maintainer agreed the spec should be updated, explaining that much of the wording came from the JSON RFC. The sentence is unchanged in the current source.
| Text | json5 2.2.3 |
|---|---|
.5 and +.5 | 0.5 |
5. | 5 |
5.e2 | 500 |
. | Error: invalid end of input |
0x1.8 and 0x1p3 | Error: invalid character |
0x | Error: invalid end of input |
What Does a Hex Number Mean? (Issue #6)
#6 (August 2018) asks what 0xFFDECAFFEEDDEEDD stores: an unsigned integer, a negative two's-complement integer, or the bit pattern of a floating-point number. The maintainer answered that it means the unsigned value 18437397125074382557. In 2020 he added that saying hex numbers are base 16 is probably enough: converting to base 10 is unambiguous, and the more interesting point is that parsers, the reference one included, give no way to recover the original hexadecimal spelling. ES5 defines the value digit by digit, each step multiplying by 16, with no bit reinterpretation. Section 6 of the spec says only that hexadecimal digits are base 16; it does not work through the value or rule out the other readings.
The practical hazard is precision, because JavaScript numbers are binary64 doubles:
| Reader | 0xFFDECAFFEEDDEEDD becomes |
|---|---|
json5 2.2.3 | A double that prints as 18437397125074383000; its exact value is 18437397125074382848 |
main with { bigint: true } | 18437397125074382557n |
| The three Python libraries | 18437397125074382557 |
Signs apply to the magnitude: -0xC0FFEE is -12648430, 0xFFFFFFFF is 4294967295 (not -1), and -0x0 is negative zero in JavaScript. See data types.
NaN and Infinity Limits (Issue #24)
The grammar allows Infinity and NaN with either sign. Section 10 lets implementations limit "the range and precision of numbers", but does not mention platforms that have no NaN at all. #24 (May 2020) asks what such a parser should do.
The maintainer replied that rejecting the document is acceptable, as is converting the value, possibly with a warning. For NaN he suggested the platform's null plus a warning, or a parser flag to throw, convert or ignore, and he added that rejecting a whole file with no alternative would frustrate developers. The reporter proposed extending the limits sentence to name infinities and NaN; it has not been added. An earlier proposal to remove both literals, #2, was closed in 2017 with both left in place. Later comments on that closed thread add two points from the maintainer: the literals will likely never leave the spec (July 2019), and he was not opposed to prose discouraging them for interoperability (June 2021). Plain JSON does not permit them.
| Case | Observed |
|---|---|
NaN, -NaN (json5 2.2.3) | NaN |
+Infinity | Infinity |
- Infinity (space after the sign) | Error: the sign is part of the number token |
1e1000 (json5 2.2.3) | Infinity |
1e-1000 | 0 |
1e1000 in Python | inf from json5 and json-five; pyjson5 raises Json5EOF |
JSON5.stringify([NaN, Infinity]) | [NaN,Infinity] |
JSON.stringify([NaN, Infinity]) | [null,null] |
The last row is the trap in conversion pipelines: the values silently turn into null. A reviver can make non-finite input fail loudly instead.
JSON5.parse('[NaN]', (key, v) => {
if (typeof v === 'number' && !Number.isFinite(v)) {
throw new RangeError('non-finite number at key ' + key);
}
return v;
});
// RangeError: non-finite number at key 0In Python, json5.dumps(float('nan'), allow_nan=False) raises ValueError on the writing side. The conversion guide covers JSON output.
Code Point Escapes (Issue #42)
#42 (September 2022) recommends adding the ES2015 form \u{1F600} to strings and identifiers, as a simpler alternative to surrogate pairs. The issue carries the label "incompatible with ES5" and has no comments. A related request in the surrogate thread asked for an eight-digit \U form.
| Input | json5 2.2.3 |
|---|---|
"\u{1F600}" | Error: invalid character '{' at 1:4 |
{\u{61}: 1} | Error |
"\U0001F600" | Accepted, giving the text U0001F600 |
"\uD83D\uDE00" | One emoji character (two code units) |
"\x41" | "A" |
These rows show why the two proposals differ in risk. \u{ is an error today, so giving it a meaning would not change any valid document. \U is already legal: an unknown escape yields the character itself, so redefining it would silently change existing data. Among other libraries, json-five 1.1.2 accepted \u{1F600} and returned the literal text u{1F600}, which is wrong under both readings.
Upgrading Past ECMAScript 5.1 (Issue #56)
The spec borrows its identifiers, numbers, escapes and white space from ECMAScript 5.1 (June 2011). #56 (April 2024) argues that this limit is arbitrary and lists newer literal syntax. It quotes the maintainer's earlier position, from #23, that adding only ES5 features keeps the format easy to implement and prevents scope creep. The single reply, from February 2025, notes that the 5 in the name refers to ES5, so a change would call for a new name. The maintainers have not commented in the thread.
| Feature | ECMAScript | Today in json5 2.2.3 | Related issue |
|---|---|---|---|
| Binary and octal literals | ES2015 | 0b101 and 0o17 are errors | #40 (closed) |
| Template literals | ES2015 | Backtick is an error | #34 (closed) |
| Code point escapes | ES2015 | Error | #42 (open) |
| Raw U+2028 and U+2029 in strings | ES2019 | Already allowed, with a console warning | Spec section 5.2 |
| BigInt literals | ES2020 | 123n is an error | #36 (open) |
| Numeric separators | ES2021 | 1_000 is an error | #23 (closed) |
The U+2028 row means the format already matches a later ECMAScript on that one point, a fact the issue itself observes. Background is on the ECMAScript relationship page and in design rationale.
BigInt and Large Integers (Issue #36)
#36 (May 2022) asks for the 123n suffix so that a round trip can preserve JavaScript BigInt values. The maintainer answered that the format already holds integers of any size: it limits no number's length and has no numeric types beyond the special values. Precision is lost by parsers that choose doubles. A suffix would be incompatible with ES5 and would mark one data type while offering nothing for 32-bit, unsigned or other widths. He published replacer and reviver functions that carry BigInts as strings. Another commenter argued the suffix should at least be tolerated as a hint.
The status quo is moving in the library rather than the syntax. The main branch adds an opt-in bigint parse option for integer literals outside the safe range, and its stringify throws on a BigInt value. Release 2.2.3 instead drops it: JSON5.stringify({ id: 1n }) returns {}.
// json5 2.2.3: the default rounds
JSON5.parse('36028797018963968'); // prints 36028797018963970
// main branch only (unreleased)
parse('[36028797018963968, 0x20000000000001, 5, 1e300]', { bigint: true });
// [ 36028797018963968n, 9007199254740993n, 5, 1e+300 ]
// Portable today: send a string and revive the keys you know
JSON5.parse("{id: '36028797018963968'}",
(k, v) => (k === 'id' ? BigInt(v) : v));
// { id: 36028797018963968n }Python integers are arbitrary precision, and all three tested libraries returned 36028797018963968 exactly.
Dates and Times (Issue #4)
#4 is the oldest open issue (March 2018) and asks only for a recommendation: write dates as strings in a standard format. Its history is unusual.
- The maintainer suggested RFC 3339 in place of ISO 8601, because it is freely available and narrower.
- He drafted a "Dates and Times" section on a v1.1.0 branch: generators are recommended to convert to UTC and write RFC 3339 strings, may use Unix time instead, and a parser that expects a date may convert either. The branch is not merged, so the text is not in the published spec. The draft also has a unit mismatch: it defines Unix time in seconds, while its example value,
1338150759534, is a millisecond count. - Commenters proposed tagged objects, string prefixes and tagged template literals. The maintainer rejected ideas that turn some strings into maybe-dates, since that breaks backward compatibility.
- He closed the issue on May 8, 2020 under the "no new data types" rule, then reopened and renamed it on May 13 because the original request was only a recommendation.
- In November 2021 a commenter proposed one sentence: timestamps SHOULD be encoded in RFC 3339 format. In April 2022 the maintainer suggested also recommending that parsers not convert strings into dates automatically without a data contract or an opt-in setting.
Today the format has no date type. 2026-11-29 unquoted is a syntax error, new Date() is rejected, and a quoted timestamp comes back as a string. On output, JSON5.stringify({ at: new Date(0) }) gives {at:'1970-01-01T00:00:00.000Z'} because the date supplies its own string form. Following RFC 3339 now is compatible with every parser.
Binary Data (Issue #35)
#35 (April 2022) asks whether the spec should recommend how to embed bytes. Three approaches are discussed in the thread.
| Approach | Argument for | Argument against |
|---|---|---|
| Base64 string | The maintainer prefers it; libraries are everywhere; I-JSON recommends the URL-safe variant | Nothing marks the string as binary |
| Data URL | Self-describing, with a media type | A missing type means plain US-ASCII text, so generic bytes need application/octet-stream |
| Array of numbers | Preserves readable bytes; what Node.js does for a Buffer | Large, and indistinguishable from any other number array |
In November 2024 a commenter proposed a real byte literal (hex inside angle brackets, or a Python-style form). Another answered that it would not survive conversion to JSON and that each platform would need its own mapping. The maintainer had said earlier that any addition would be an interoperability recommendation. The latest comment is from May 2025 and nothing has been decided.
JSON5.stringify(Buffer.from('hi')); // {type:'Buffer',data:[104,105]}
JSON5.stringify(new Uint8Array([104, 105])); // {'0':104,'1':105}
const doc = JSON5.parse("{b: 'aGk='}");
Buffer.from(doc.b, 'base64').toString(); // 'hi'Both literal forms from the proposal are syntax errors today. Encode explicitly, and describe the encoding in a schema (see schema validation).
Standardization (Issues #33, #37, #43)
The spec source labels itself "standard" and calls the format a proposed extension to JSON. It is published by the project itself, and uses RFC 2119 key words. Three issues ask for more.
| Issue | Request | Maintainer response |
|---|---|---|
| #33 (October 2021) | Publish as an internet standard (RFC), without trying to replace JSON | Pointed to an earlier discussion, json5/json5#190, which is closed and locked |
| #37 (July 2022) | Submit to TC39, which also covers ECMA-404, as a version update | Jordan Tucker was open to contacting Ecma with the original author's approval; Aseem Kishore deferred to his judgment |
| #43 (September 2022) | Propose parsing and serialization for ECMAScript, and register application/json5 | Aseem Kishore wrote that he would be grateful for anyone leading the effort, citing no standards experience and limited time |
No later activity in these threads reports a submission. On November 29, 2026, the IANA media type registry listing of application types had no entry for json5. The standards page covers what that means for HTTP and tooling, and history gives the background.
One organization for implementations (Issue #44)
#44 (October 2022) suggests gathering parsers and formatters under the json5 GitHub organization, offering the author's Zig library first. It has no replies. It concerns project housekeeping and would not change the format. Current options are listed under implementations.
Writing Documents That Avoid the Open Questions
Until the issues are resolved, a producer can sidestep nearly all of them. These are suggestions drawn from the behavior above, not spec requirements.
- Never repeat a key, however it is spelled.
- Write non-ASCII characters directly in a UTF-8 file, and never emit a lone surrogate.
- Write
0.5and5.0when readers may include strict or homegrown parsers; no leading zeros. - Keep integers within the safe range, and send larger ones as strings.
- Use
NaNandInfinityonly when every consumer supports them. - Write dates as RFC 3339 strings and bytes as Base64 with a documented field.
- Stay with ES5 syntax even if one library accepts more.
To follow a question, watch the linked issue. To check a specific library against the grammar as written, start with the grammar reference and the conformance results.
Common Questions
Will there be a version 1.1 of the spec?
None is published. A v1.1.0 branch with a dates recommendation was drafted in March 2018 and has not been merged, and the v1.1.0 milestone has no due date.
Are duplicate keys allowed?
Yes. Unique names are a recommendation. The spec lets an implementation keep the last value, raise an error or report every pair.
Is a lone surrogate escape valid?
The grammar accepts it, but a parser may limit string contents, and pyjson5 does reject it. Avoid producing one.
Can I rely on large integers?
The text can carry any number of digits, but a parser may limit precision. In JavaScript the 2.2.3 release rounds to a double.
Where should I report a new ambiguity?
Search the existing issues, then open one in json5/json5-spec with a minimal input and the observed behavior.
Sources
(39)
- The JSON5 Data Interchange Format, version 1.0.0
- Specification source, master branch
- Specification source, v1.1.0 branch with the dates section
- json5-spec open issues
- json5-spec v1.1.0 milestone
- json5-spec issue #58
- json5-spec issue #56
- json5-spec issue #44
- json5-spec issue #43
- json5-spec issue #42
- json5-spec issue #38
- json5-spec issue #37
- json5-spec issue #36
- json5-spec issue #35
- json5-spec issue #33
- json5-spec issue #28
- json5-spec issue #25
- json5-spec issue #24
- json5-spec issue #12
- json5-spec issue #6
- json5-spec issue #4
- json5-spec issue #2 (closed)
- json5-spec issue #23 (closed)
- json5-spec issue #34 (closed)
- json5-spec issue #40 (closed)
- json5/json5 issue #190 on consolidation and standards
- json5 reference library changelog (unreleased changes)
- json5 reference library README (parse options)
- ECMAScript Language Specification, Edition 5.1
- TC39 finished proposals
- RFC 8259: JSON
- RFC 7493: The I-JSON Message Format
- RFC 3339: Date and Time on the Internet
- RFC 4648: Base16, Base32 and Base64
- RFC 2397: The data URL scheme
- IANA media type registry
- json5 on PyPI
- pyjson5 on PyPI
- json-five on PyPI
Last reviewed: November 29, 2026.
JavaScript
Python
TypeScript
Node.js
Rust
Java
C#
Ruby
Kotlin
Lua
Babel
Vite
webpack
ESLint
Prettier
VS Code
JetBrains