pub fn to_json(envelope: &ValueEnvelope) -> ValueExpand description
Convert an envelope to JSON (for debugging/external tools)
JSON is less efficient than MessagePack but more portable and human-readable.
ยงExample
use shape_wire::{to_json, ValueEnvelope};
let env = ValueEnvelope::string("hello");
let json = to_json(&env);
assert!(json["value"]["String"].is_string());