Skip to main content

to_value

Function to_value 

Source
pub fn to_value<T: Facet<'static>>(value: &T) -> Result<Value, String>
Available on crate feature mcp and non-WebAssembly only.
Expand description

Serialise a value through the reflection it derives.

The information structs the original crates expose carry their own reflection, so the JSON this transport speaks is derived from their fields rather than written down a second time here.