Function ::json::from_string

Overview
fn from_string(string: String) -> Result

Convert a JSON string into a rune value.

Examples

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