﻿# I-JSON large identifiers need an exact representation

JSON accepts numeric syntax beyond portable exact integer precision; large identifiers need an agreed representation preserved through parsing, storage and outbound requests.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-ijson-large-identifier-precision/
Language: en

## 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](https://www.rfc-editor.org/rfc/rfc8259.html) 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](https://www.rfc-editor.org/rfc/rfc7493.html) 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](https://protobuf.dev/programming-guides/json/) 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](/journal/learn-codex-task-contract/) 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](/journal/learn-codex-tool-observation/) 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.
