Skip to main content

Module jsonb

Module jsonb 

Source
Expand description

JSONB binary format for O(log n) field access on Ring 0.

The JSONB format is a compact binary encoding of JSON values with pre-computed byte offsets. Object keys are sorted alphabetically, enabling binary-search field lookups in <100ns for typical objects.

§Type Tags

TagTypeData
0x00Null(none)
0x01Boolean false(none)
0x02Boolean true(none)
0x03Int648 bytes LE
0x04Float648 bytes IEEE 754 LE
0x05String4-byte LE length + UTF-8 bytes
0x06Array4-byte count + offset table + elements
0x07Object4-byte count + offset table + key-value data

Modules§

tags
Type tags for the JSONB binary format.

Structs§

JsonbAccessor
Zero-allocation JSONB accessor for Ring 0 hot-path field lookups.
JsonbEncoder
Encodes serde_json::Value into JSONB binary format.