Skip to content

Archive

Data Formats

1 articles
Software Engineering 13 Sep 2026 7 min read

Canonical Serialization Makes Byte Identity Explicit

Two serialized documents can represent the same application value and still differ byte for byte. An object member can appear in another order. A number can use a different textual form. Unicode text can contain distinct code-point sequences that render alike. Whitespace may be optional. A serializer can make any of these choices while remaining valid for its format. That flexibility is usually harmless when serialization is only a transport boundary. It becomes part of system semantics when bytes are hashed, signed, compared, cached by digest, or used as content addresses. At that point, logical equivalence is not enough. The operation consumes an exact byte sequence.