A payload can pass every validation you throw at it and still arrive changed. Grammar checking and value checking are different gates, and only the first one is automated in most pipelines. The second one is where large integers quietly lose their last digit.
Two gates, one payload
Input: {"snapshot_id": 483570298815721389}
- Grammar gate: valid JSON — every token conforms
- Value gate: after parsing in binary64, the id reads back as
483570298815721392
The inspector shows both views at once. The source pane keeps the token exactly as written; the parsed tree shows what the runtime materialized. When the two disagree, the pane difference is the bug, stated in digits rather than in theory.
Why validation missed it
Schemas describe ranges and types, not representation fidelity. A schema that says "snapshot_id": integer is satisfied by the rounded value too, because the rounded value is a number. JSON Schema cannot see the wire once the parse has happened, and by then the original digits exist only in the raw body — if it was kept at all.
Three checks that close the gap
- Keep the raw body through at least one debug hop, so the token is comparable
- Assert
Number.isSafeIntegeron every numeric field that behaves like an identifier - Prefer the string form on the wire for any ID above
2^53 - 1, and let storage decide its own numeric type
None of this requires new infrastructure. It requires agreeing that “valid JSON” answers the question “is the format right,” and a separate, explicit check answers “is the value the one that was sent.” The tool keeps both answers on one screen so the comparison is part of looking, not a separate ceremony.
The cost of finding out late
A rounded identifier does not fail fast. It fails on a lookup, weeks later, against a record that “does not exist,” while the log shows the ID that was sent and the database stores the ID that was parsed. Reconciling the two means keeping raw bodies around and diffing tokens — work nobody budgeted for.
Teams that adopt the string-on-the-wire convention report the same surprise in reverse: the whole class of lookups-missing-by-one-digit disappears, and the only code change was quotes around the field at the boundary. The verification tool remains useful after the migration, as the local step that proves a producer actually emits strings before a contract review signs off.