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

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

#2843 in Parser implementations

Download history 11/week @ 2024-02-19 4/week @ 2024-02-26 73/week @ 2024-04-01

73 downloads per month

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