Expand description
Bridge between serde_json::Value and Python objects.
For typed plugin calls, the host serialises arguments through
serde_json::to_value (any Serialize type works) and we then convert
the JSON tree into Python primitives. The reverse is symmetric: take a
Python return value and turn it back into a serde_json::Value the host
can serde_json::from_value::<O> into the expected return type.
JSON is the wire format because it’s the common ground between
self-describing-serde-on-the-Rust-side and natural-Python-types-on-the-
Python-side. The hot path for bulk data uses #[wire(raw)] (T-0082)
which bypasses this layer entirely.
Functions§
- pyobject_
to_ value - Convert a Python object back into a
serde_json::Value. - value_
to_ pyobject - Convert a
serde_json::Valueinto a Python object owned bypy.