CBOR Binary Data Format

CBOR Binary Data Format

cbor.io

3

About this website

Concise Binary Object Representation (CBOR) is a binary data serialization format defined in RFC 8949 that provides a compact, extensible, and efficient encoding for structured data. Created by Carsten Bormann (IETF) and standardized by the IETF, CBOR is designed as a binary counterpart to JSON with significantly smaller encoding and faster processing. Key features: binary encoding (type-length-value encoding with major types 0-7 for unsigned integers, negative integers, byte strings, text strings, arrays, maps, tags, and simple values, plus indefinite-length encoding for streaming). Compact size (typically 30-50 percent smaller than JSON due to binary encoding of numbers, compact string length prefixes, and elimination of delimiters and whitespace). Schema-less (self-describing format like JSON, requiring no external schema definition for parsing). Extensibility (tag system with IANA-registered tags for standard data types including dates, URLs, UUIDs, bignums, rational numbers, and regular expressions). Deterministic encoding (canonical CBOR for deterministic encoding ensuring identical binary output for equivalent data, critical for cryptographic hashing and digital signatures). Streaming support (indefinite-length arrays, maps, byte strings, and text strings for encoding and decoding data of unknown or very large length). Language support (implementations in over 50 programming languages including C, C++, Python, Java, JavaScript, Go, Rust, Ruby, PHP, Swift, Haskell, Erlang, Elixir, and Elm). IETF standardization (RFC 8949 as the core specification, with CBOR-based protocols including COSE RFC 8152 for cryptography, CDDL RFC 8610 for data definition, and SenML RFC 8428 for sensor measurement). IoT suitability (designed for constrained devices with minimal parsing overhead and small encoding size, used in CoAP, ACE-OAuth, and EAT Entity Attestation Tokens). Map ordering (deterministic encoding can enforce canonical key ordering for reproducibility).

Tags & Categories

Statistics

3
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!