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

Strings and containers

02

Byte strings, UTF-8 text, arrays, and maps have distinct major types.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

DIAGRAM§ 3.1 ↗
RFC 8949 · § 3.1EXAMPLE
3 / 3
Strings and containersByte strings, UTF-8 text, arrays, and maps have distinct major types.Strings and containersA1616101{"a": 1}text key ainteger 1
03
Compare a map

A1 61 61 01 represents one text key a mapped to 1.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

Byte strings are arbitrary bytes; text strings contain UTF-8.

  • Byte strings are arbitrary bytes; text strings contain UTF-8.
  • Arrays contain ordered items; maps contain key/value pairs.
  • A protocol must define how map keys and duplicate keys are handled.
DETAILS

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. Initial byte and arguments
  2. Strings and containers
  3. Indefinite lengths
  4. Tags and data models
  5. Deterministic encoding
RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗