Concise Binary Object Representation
CBOR is an extensible binary serialization format for structured values, including native byte strings, arrays, maps and tagged data.
Model: CBOR builds on JSON-like structured values but represents binary data directly and uses tags for additional interpretation. A schema is not required to decode the basic representation. [1]
Encoding: Preferred serialization alone is not deterministic. Core deterministic encoding forbids indefinite lengths and sorts encoded map keys bytewise; length-first ordering is a different profile. Numeric and tag choices also require agreement. [2]
Validity: Byte strings and text strings differ. Duplicate map keys are invalid, while host-language equality may collapse distinct keys. Generic string equality does not normalize Unicode. [2]
Storage: Preserve the encoding profile with a content-addressed manifest. A decoder accepting bytes does not establish the application's identity or freshness requirements. This is an engineering inference, not a durability guarantee. [3]
Relations
Citations
- CBOR project overview: binary data, structured values and tags
- RFC 8949: sections 4.1-4.2.3, 5.3 and 5.6.1
- Hesela: CBOR encoding profiles before content hashing
Sources & caveats
- Primary-source synthesis; selected map-ordering examples are not a complete encoder, conformance suite or storage benchmark.