#string-parser #extract #json #value #thing

binary-extract

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

6 releases

0.3.0 Mar 3, 2023
0.2.3 Mar 3, 2023
0.1.0 Feb 24, 2023

#12 in #thing

MIT license

7KB
155 lines

binary-extract

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

📖 Docs

📦 Crate

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

License

MIT

Dependencies

~145KB