JSON formatter changed an ID? Check large-number precision

If an order ID changes after formatting, stop copying the result and preserve the original response. First check whether the ID was delivered as a JSON number.

Reproduce the change

Paste {"id":9007199254740993} into the JSON formatter. This tool uses ordinary JavaScript number parsing: formatting produces 9007199254740992. Indentation is not the cause; the value changed during parsing.

Find the first lossy step

  1. Inspect the raw response text rather than an already parsed object.
  2. Compare that source with the formatted result. If the raw response is already wrong, investigate the producer.
  3. If only the parsed value changes, check the parser and field type.

Choose a fix that preserves the source

For identifiers, ask the producer to send {"id":"9007199254740993"}. Converting an already rounded number to a string cannot recover the original. For arithmetic, use a parser and numeric representation that explicitly support the required precision.

What a successful validation does not prove

Syntax validation does not establish lossless numeric handling or a correct business schema. Test order IDs, amounts and timestamps against known values. The JSON diff tool also parses input, so agreement between parsed results is not proof of lossless handling.

Reference: MDN: JSON.parse and number precision.