Skip to main content

Module json

Module json 

Source
Expand description

Neutral JSON/encoding helpers shared by checkpoint and passive storage (D96).

This module owns the strict/canonical JSON byte contract used by storage, checkpoints, and future V1 hash inputs. It is deliberately independent of graph lifecycle and storage tier types.

Structs§

JsonCodec
JsonCodec data container.
StrictJsonCodec
StrictJsonCodec data container.

Enums§

JsonCodecError
JsonCodecError variants.

Traits§

Codec
Typed byte codec for D82 storage binding helpers and D96 JSON surfaces.

Functions§

assert_decimal_integer_string
Creates or computes assert_decimal_integer_string.
assert_non_negative_decimal_integer_string
Creates or computes assert_non_negative_decimal_integer_string.
decimal_string_to_i128
Creates or computes decimal_string_to_i128.
i128_to_decimal_string
Creates or computes i128_to_decimal_string.
is_decimal_integer_string
Creates or computes is_decimal_integer_string.
is_non_negative_decimal_integer_string
Creates or computes is_non_negative_decimal_integer_string.
json_codec_for
Creates or computes json_codec_for.
non_negative_decimal_string_to_u128
Creates or computes non_negative_decimal_string_to_u128.
stable_json_string
Stable JSON string with object keys sorted by JavaScript UTF-16 code-unit order.
strict_canonical_json_bytes
D113 neutral helper for strict canonical JSON UTF-8 bytes.
strict_json_codec_for
Creates or computes strict_json_codec_for.
strict_json_decode
Decode strict canonical JSON bytes, rejecting malformed UTF-8, duplicate keys, non-canonical byte shape, and values that fail the shared strict validator.
u128_to_non_negative_decimal_string
Creates or computes u128_to_non_negative_decimal_string.
validate_strict_json_value
Shared strict JSON value validator for checkpoint and storage canonical bytes.

Type Aliases§

DecimalIntegerString
DecimalIntegerString type alias.
JsonCodecResult
JsonCodecResult type alias.
JsonValue
JsonValue type alias.
NonNegativeDecimalIntegerString
NonNegativeDecimalIntegerString type alias.