Skip to main content

Module codec

Module codec 

Source
Expand description

Canonical JSON encoding, decoding, and format versions. Bounded canonical JSON encoding and fail-closed decoding.

Structs§

CodecVersion
Version of the canonical JSON codec itself.
FormatVersion
A format version owned by a later schema/query/migration envelope.

Functions§

ensure_codec_version
Require an exact codec version before payload construction.
ensure_format_version
Require an exact owning-format version before payload construction.
from_canonical_json
Decode only exact canonical bytes, checking limits before constructing T.
from_canonical_json_with_limits
Decode exact canonical bytes under explicit structural limits.
to_canonical_json
Encode one value to compact, key-sorted canonical JSON bytes.
to_canonical_json_with_limits
Encode one value under explicit structural limits.