Appendix B. Jump Table
For brevity, this jump table does not show initial bytes that are reserved for future extension. It also only shows a selection of the initial bytes that can be used for optional features. (All unsigned integers are in network byte order.)
| Byte | Structure/Semantics |
|---|---|
| 0x00..0x17 | Integer 0x00..0x17 (0..23) |
| 0x18 | Unsigned integer (one-byte uint8_t follows) |
| 0x19 | Unsigned integer (two-byte uint16_t follows) |
| 0x1a | Unsigned integer (four-byte uint32_t follows) |
| 0x1b | Unsigned integer (eight-byte uint64_t follows) |
| 0x20..0x37 | Negative integer -1-0x00..-1-0x17 (-1..-24) |
| 0x38 | Negative integer -1-n (one-byte uint8_t for n follows) |
| 0x39 | Negative integer -1-n (two-byte uint16_t for n follows) |
| 0x3a | Negative integer -1-n (four-byte uint32_t for n follows) |
| 0x3b | Negative integer -1-n (eight-byte uint64_t for n follows) |
| 0x40..0x57 | byte string (0x00..0x17 bytes follow) |
| 0x58 | byte string (one-byte uint8_t for n, and then n bytes follow) |
| 0x59 | byte string (two-byte uint16_t for n, and then n bytes follow) |
| 0x5a | byte string (four-byte uint32_t for n, and then n bytes follow) |
| 0x5b | byte string (eight-byte uint64_t for n, and then n bytes follow) |
| 0x5f | byte string, byte strings follow, terminated by "break" |
| 0x60..0x77 | UTF-8 string (0x00..0x17 bytes follow) |
| 0x78 | UTF-8 string (one-byte uint8_t for n, and then n bytes follow) |
| 0x79 | UTF-8 string (two-byte uint16_t for n, and then n bytes follow) |
| 0x7a | UTF-8 string (four-byte uint32_t for n, and then n bytes follow) |
| 0x7b | UTF-8 string (eight-byte uint64_t for n, and then n bytes follow) |
| 0x7f | UTF-8 string, UTF-8 strings follow, terminated by "break" |
| 0x80..0x97 | array (0x00..0x17 data items follow) |
| 0x98 | array (one-byte uint8_t for n, and then n data items follow) |
| 0x99 | array (two-byte uint16_t for n, and then n data items follow) |
| 0x9a | array (four-byte uint32_t for n, and then n data items follow) |
| 0x9b | array (eight-byte uint64_t for n, and then n data items follow) |
| 0x9f | array, data items follow, terminated by "break" |
| 0xa0..0xb7 | map (0x00..0x17 pairs of data items follow) |
| 0xb8 | map (one-byte uint8_t for n, and then n pairs of data items follow) |
| 0xb9 | map (two-byte uint16_t for n, and then n pairs of data items follow) |
| 0xba | map (four-byte uint32_t for n, and then n pairs of data items follow) |
| 0xbb | map (eight-byte uint64_t for n, and then n pairs of data items follow) |
| 0xbf | map, pairs of data items follow, terminated by "break" |
| 0xc0 | Text-based date/time (data item follows; see Section 2.4.1) |
| 0xc1 | Epoch-based date/time (data item follows; see Section 2.4.1) |
| 0xc2 | Positive bignum (data item "byte string" follows) |
| 0xc3 | Negative bignum (data item "byte string" follows) |
| 0xc4 | Decimal Fraction (data item "array" follows; see Section 2.4.3) |
| 0xc5 | Bigfloat (data item "array" follows; see Section 2.4.3) |
| 0xc6..0xd4 | (tagged item) |
| 0xd5..0xd7 | Expected Conversion (data item follows; see Section 2.4.4.2) |
| 0xd8..0xdb | (more tagged items, 1/2/4/8 bytes and then a data item follow) |
| 0xe0..0xf3 | (simple value) |
| 0xf4 | False |
| 0xf5 | True |
| 0xf6 | Null |
| 0xf7 | Undefined |
| 0xf8 | (simple value, one byte follows) |
| 0xf9 | Half-Precision Float (two-byte IEEE 754) |
| 0xfa | Single-Precision Float (four-byte IEEE 754) |
| 0xfb | Double-Precision Float (eight-byte IEEE 754) |
| 0xff | "break" stop code |
Table 5: Jump Table for Initial Byte