Function binary_extract::extract

source ·
pub fn extract(s: &str, key: &str) -> Result<JsonValue, &'static str>
Expand description

Extract a value from a json string without parsing the whole thing

Examples

let value = binary_extract::extract(r#"{"foo": "bar"}"#, "foo").unwrap();
assert_eq!(value, "bar");