Crates.io | binary-extract |
lib.rs | binary-extract |
version | 0.3.0 |
source | src |
created_at | 2023-02-24 16:15:51.576923 |
updated_at | 2023-03-03 18:08:32.234434 |
description | Extract a value from a json string without parsing the whole thing |
homepage | |
repository | |
max_upload_size | |
id | 793743 |
size | 10,036 |
Extract a value from a json string without parsing the whole thing.
$ cargo add binary-extract
let value = binary_extract::extract(r#"{"foo": "bar"}"#, "foo").unwrap();
assert_eq!(value, "bar");
With the object from benches/json.rs, extract()
is ~3.5x
faster than json::parse
.
MIT