Closed download13 closed 5 years ago
Thanks for your suggestion.
Since the JSON5 spec is not specific about the data structures used to represent numbers, and does not impose a limit on the length of an integer, your first example is already supported by the spec. Implementations are free to parse large integers as BigInts or equivalent structures depending on the platform. If this is something you would like the JSON5 JavaScript library to do, please create an issue or submit a PR there.
The second example is a violation of the ES5 spec. In an effort to keep JSON5 simple, all features must conform to the ES5 spec.
Now that bigints are a thing in JS it might be useful to support them in json5.
Example: