Function ::json::from_bytes

fn from_bytes(bytes: Bytes) -> Result

Convert JSON bytes into a rune value.

Examples

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