Skip to main content

Module tape

Module tape 

Source
Expand description

Tape parser for simdjson DOM tape format.

The simdjson DOM parser serializes parsed JSON into a “tape” - an array of 64-bit words. Each word encodes its node type in the top 8 bits and a payload (e.g., string offset, number of elements, or sibling index) in the lower 56 bits.

§Tape type byte values (top 8 bits of each tape word)

CharHexMeaning
r0x72Root node (always first and last entries)
{0x7BStart of object (payload = end-of-scope index)
}0x7DEnd of object (payload = start index)
[0x5BStart of array (payload = end-of-scope index)
]0x5DEnd of array (payload = start index)
"0x22String (payload = byte offset into string_buf)
l0x6CSigned integer (next tape word = i64 bits)
u0x75Unsigned integer(next tape word = u64)
d0x64Double (next tape word = f64 bits)
t0x74Boolean true
f0x66Boolean false
n0x6ENull

Structs§

TapeRef
A cursor over the simdjson DOM tape.

Enums§

Error
The error type returned by Tape operations.
TapeType
Tape type byte values encoded in the top 8 bits of each tape word.
Value
A zero-copy representation of a JSON value parsed from the simdjson tape.

Traits§

TapeVisitor
Callback-based visitor interface for the simdjson tape.

Type Aliases§

Result