#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

#55 in #query-language

Download history 3216/week @ 2026-03-03 23507/week @ 2026-03-10 25557/week @ 2026-03-17 34275/week @ 2026-03-24 25270/week @ 2026-03-31 31815/week @ 2026-04-07 36347/week @ 2026-04-14 30547/week @ 2026-04-21 25578/week @ 2026-04-28 25118/week @ 2026-05-05 24548/week @ 2026-05-12 22214/week @ 2026-05-19 23156/week @ 2026-05-26 26298/week @ 2026-06-02

100,146 downloads per month
Used in 46 crates (27 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