CBOR (Concise Binary Objeto Representation) Specification
CBOR (RFC 8949) es un binary datos formatear extending JSON con compact codificación, typed valores, y extensibility.
Encoding Features
CBOR encodes JSON-compatible data in a compact binary format with type tags. Integers use variable-length encoding for efficiency. Strings, byte strings, arrays, and maps have definite and indefinite-length forms. CBOR supports types beyond JSON: byte strings, bignums, dates, URIs, and custom tags. The format is self-describing and extensible via tag numbers.
- compact
- Variable-length ints
- byte strings
- Native binary support
- tags
- Extended types
smaller than JSON no base64 needed dates, bignums, URIs Applications
CBOR is used in COAP (Constrained Application Protocol) for IoT. WebAuthn uses CBOR for authenticator messages. The format is specified in RFC 8949 (formerly 7049). CBOR supports deterministic encoding for canonical comparison and hashing. The Concise Data Definition Language (CDDL) describes CBOR structures. Libraries exist for most programming languages.
- COAP
- IoT protocol
- WebAuthn
- FIDO2 messages
- deterministic
- Canonical encoding
RFC 7252 binary protocol for hashing