In this article
Choose the exact representation before the first numeric parse; converting a rounded identifier to a string later cannot recover its original value.
Follow the identifier through the first decoder
A document service returns a large integer identifier, which a browser later sends back when requesting the source. The identifier can be valid JSON while exceeding the exact integer precision of the client’s number type. JSON’s specification explicitly distinguishes syntax from receiver limits. Successful parsing is therefore insufficient evidence that the identifier still refers to the original document after the client stores and serializes it.
Define the portable precision boundary
The specification identifies interoperable integer agreement within the familiar bound 2^53 - 1 in magnitude for binary64-based implementations. A larger value is not inherently forbidden by JSON grammar, but a contract cannot assume every receiver preserves it exactly. The I-JSON profile recommends string encoding when greater precision or magnitude is needed. State that representation explicitly for identifiers rather than treating them as arithmetic quantities merely because they contain digits.
Preserve the representation across every layer
A string at the final response is too late if an intermediary already rounded the value during numeric parsing. Review request decoding, database adapters, queue messages and outbound serialization. Keep the same exact identifier meaning at each boundary. A lookup or equality check performed against a rounded value can select the wrong object even when later components follow their own declared string schemas correctly.
Respect the concrete serialization profile
The ProtoJSON format quotes wide integer types in generated output to avoid this precision problem, while describing accepted parser forms and interoperability caveats. That profile is a specific contract. Do not turn it into a claim that arbitrary APIs accept both string and numeric identifiers interchangeably. Task contracts identify the resource a request must address; representation changes must preserve that identity under the interface actually being used.
Inspect exact identity before interpreting the response
Compare the original serialized identifier with what the consumer persists and sends back, using exact text or an appropriate exact numeric type. Tool observations retain that path. An attractive analysis returned for a request cannot establish that the correct source was addressed. The useful result is an exact identifier round trip, with no silent rounding hidden beneath a formally successful parse or response.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.