#query-language #json-query

jmespath

Rust implementation of JMESPath, a query language for JSON

7 releases (breaking)

Uses new Rust 2024

0.5.0 Jan 19, 2026
0.4.0 Jul 10, 2025
0.3.0 Feb 24, 2022
0.2.0 Aug 26, 2017
0.0.1 Jan 31, 2016

#40 in Database interfaces

Download history 20550/week @ 2026-01-23 22873/week @ 2026-01-30 29864/week @ 2026-02-06 22645/week @ 2026-02-13 13966/week @ 2026-02-20 16674/week @ 2026-02-27 20166/week @ 2026-03-06 23434/week @ 2026-03-13 32806/week @ 2026-03-20 28676/week @ 2026-03-27 27259/week @ 2026-04-03 38622/week @ 2026-04-10 26142/week @ 2026-04-17 34825/week @ 2026-04-24 23077/week @ 2026-05-01 24643/week @ 2026-05-08

115,427 downloads per month
Used in 40 crates (24 directly)

MIT license

170KB
4K SLoC

JMESPath for Rust

Rust implementation of JMESPath, a query language for JSON.

Documentation

Installing

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.5"

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.5"
features = ["specialized"]

Examples

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());

Dependencies

~0.3–1MB
~18K SLoC