6 releases
0.3.0 | Mar 3, 2023 |
---|---|
0.2.3 | Mar 3, 2023 |
0.1.0 | Feb 24, 2023 |
#12 in #thing
7KB
155 lines
binary-extract
Extract a value from a json string without parsing the whole thing.
Installation
$ cargo add binary-extract
Example
let value = binary_extract::extract(r#"{"foo": "bar"}"#, "foo").unwrap();
assert_eq!(value, "bar");
Perf
With the object from benches/json.rs, extract()
is ~3.5x
faster than json::parse
.
See also
- binary-extract (JavaScript)
- go-binary-extract
License
MIT
Dependencies
~145KB