Function json::to_string

Overview
fn to_string(value: any) -> 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"});