Expand description
Typed sum-type for parsed-data trees.
Replaces the ValueWord-tree return that pre-bulldozer parsers
(json / yaml / toml / msgpack / xml) used. The strict-typed
answer is a single concrete enum with the union of variants needed
across all five formats; consumers pattern-match exhaustively.
Insertion order of Object fields is preserved by storing key-value
pairs in a Vec rather than a HashMap. This matches the on-the-wire
ordering of JSON / TOML / YAML / MsgPack and lets round-trip
serialization stay byte-identical.
See docs/defections.md (2026-05-06 — typed JsonValue) for the
rationale, and (2026-05-07 — N7 unified workstream — ε disposition)
for the universal-intermediate role.
ADR-005: JsonValue is the parser-intermediate / wire-form translation
layer, NOT a runtime storage type for user objects. Runtime objects live
in HeapValue::TypedObject with a flat schema-driven slot array. The
typed-parse path (__parse_typed) projects JsonValue to TypedObject
before reaching user code; only the untyped json.parse path surfaces
JsonValue to user code (as the Json enum in
stdlib-src/core/json_value.shape). See
docs/adr/005-typed-slot-construction.md.
Enums§
Functions§
- heap_
to_ json_ value - Walk a
HeapValuetree and produce aJsonValue. - json_
value_ to_ msgpack_ bytes - Encode a
JsonValueto MessagePack bytes. - json_
value_ to_ serde_ json - Convert a
JsonValueinto aserde_json::Value. - json_
value_ to_ serde_ yaml - Convert a
JsonValueinto aserde_yaml::Value. - json_
value_ to_ toml_ value - Convert a
JsonValueinto atoml::Value.