| Crates.io | jmespath |
| lib.rs | jmespath |
| version | 0.4.0 |
| created_at | 2016-01-31 03:43:58.200616+00 |
| updated_at | 2025-07-10 01:03:21.123102+00 |
| description | Rust implementation of JMESPath, a query language for JSON |
| homepage | https://github.com/jmespath/jmespath.rs |
| repository | https://github.com/jmespath/jmespath.rs |
| max_upload_size | |
| id | 4028 |
| size | 310,259 |
Rust implementation of JMESPath, a query language for JSON.
This crate is on crates.io and can be used
by adding jmespath to the dependencies in your project's Cargo.toml.
[dependencies]
jmespath = "0.4"
If you are using a nightly compiler, or reading this when specialization in Rust
is stable (see rust#31844), then
enable the specialized feature to switch on usage of specialization to get more
efficient code:
[dependencies.jmespath]
version = "0.4"
features = ["specialized"]
extern crate jmespath;
let expr = jmespath::compile("foo.bar").unwrap();
// Parse some JSON data into a JMESPath variable
let json_str = r#"{"foo": {"bar": true}}"#;
let data = jmespath::Variable::from_json(json_str).unwrap();
// Search the data with the compiled expression
let result = expr.search(data).unwrap();
assert_eq!(true, result.as_boolean().unwrap());