Function ::json::to_string

fn to_string(value) -> Result

Convert any value to a json string.

Examples

let object = #{"number": 42, "string": "Hello World"};
let object = json::from_string(json::to_string(object)?)?;
assert_eq!(object, #{"number": 42, "string": "Hello World"});