breadcrumbsRead as Markdown ↗

REFERENCE / 001

JSON across
tool boundaries.

A valid JSON document does not guarantee every tool will interpret it the same way. These three small cases help identify where an assumption gets lost.

01. Duplicate object names

{"mode":"read","mode":"write"}

RFC 8259 says object names should be unique. Duplicate-name handling differs between parsers. JavaScript’s JSON.parse retains the later value here; another parser may reject the document. Reject duplicates when interpreting permissions or signing structured data.

02. A character can have two spellings

"\u00e9"
"e\u0301"

Both can display as “é,” but their code points and UTF-8 bytes differ. A byte-level hash will differ too. If your protocol requires Unicode normalization, specify the form explicitly and apply it consistently before signing or comparing.

03. Integers beyond a tool’s exact range

JSON.parse('9007199254740993') === 9007199254740992
// true in JavaScript

JavaScript numbers cannot represent every integer beyond 2⁵³ − 1. For large identifiers, specify decimal strings in the schema instead of assuming all consumers support arbitrary-precision integers.

JSON specification (RFC 8259) · Machine-readable examples