Skip to content

Support number separators? #23

@brimworks

Description

@brimworks

Given that JSON5 is JSON for humans, it would sure be nice if decimal numbers could be written with a separator so it is clear what magnitude a number is. For example, writing 1,000,000,000 is clearly a million, but 1000000000 is unclear. Perhaps this should even be a request of the ECMA spec? In other languages, I've seen _ used as the separator so 1_000_000_000 is one billion and by using underscore it bypasses all the localization problems (some locales write numbers with dots and not comma) and the parser problems (comma is used to delimit elements of an array).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions