Skip to main content

json_value_to_serde_yaml

Function json_value_to_serde_yaml 

Source
pub fn json_value_to_serde_yaml(jv: &JsonValue) -> Value
Expand description

Convert a JsonValue into a serde_yaml::Value.

Used by N7 consumer C10 (yaml.stringify). Pair with heap_to_json_value to round-trip a HeapValue tree to a YAML string via serde_yaml::to_string(&v)?.

Lossy mapping shape parallels parse-side yaml.rs precedent (yaml.rs:75-78 unwraps serde_yaml::Value::Tagged); on the encode side, we never produce Tagged, so no lossy path. JsonValue::Bytes maps to Value::Sequence of u8 numbers (YAML has no native byte type); reserved for future msgpack-binary roundtrip via 3.C.