Visual RFC.
ALL RFCs / RFC 8949
Read the RFC ↗

RFC 8949 / START HERE

CBOR binary data, before the details

CBOR: Concise Binary Object Representation

CBOR is a binary format for structured data. It can represent familiar values such as numbers, text, arrays, and maps with compact encodings.

The idea in one picture

  1. An app has structured values

  2. CBOR encodes compact bytes

  3. Another app decodes the values

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Some applications need structured data with less overhead than a text format, particularly when devices or messages are constrained.

A familiar example

A small sensor sends a compact record containing a measurement and its timestamp.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Initial byte and argumentsThe first byte carries a three-bit major type and five-bit additional information.
  2. Strings and containersByte strings, UTF-8 text, arrays, and maps have distinct major types.
  3. Indefinite lengthsSome strings and containers can end with a break code rather than carrying a known length.
  4. Tags and data modelsA tag adds semantic interpretation to the following data item.
  5. Deterministic encodingA protocol can require one chosen serialization among several valid encodings.
Start with chapter one →

This introduction explains RFC 8949 (2020). Read the original RFC ↗