Skip to content
Changelog
fixjson

JSON Formatter v1.3 — a warning for integers JSON cannot hold

v1.3

JavaScript stores numbers as doubles, so any integer past 2^53 (9007199254740991) is rounded the moment it is parsed. 9007199254740993 came out of the formatter as 9007199254740992 with nothing to say it had changed, which is how a database ID gets corrupted while looking perfectly valid.

The formatter now scans the source text, where the digits are still exact, and lists every such integer under Precision warnings with its line and column and the value it becomes. Click one to jump to it. If the exact digits matter, keep the value as a string.

All changes