#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

#45 in Database interfaces

Download history 6929/week @ 2025-12-29 24588/week @ 2026-01-05 32306/week @ 2026-01-12 25445/week @ 2026-01-19 18656/week @ 2026-01-26 26961/week @ 2026-02-02 28209/week @ 2026-02-09 21417/week @ 2026-02-16 12057/week @ 2026-02-23 17534/week @ 2026-03-02 21998/week @ 2026-03-09 24691/week @ 2026-03-16 34810/week @ 2026-03-23 27412/week @ 2026-03-30 26761/week @ 2026-04-06 38882/week @ 2026-04-13

128,973 downloads per month
Used in 36 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
~19K SLoC