jpx
JMESPath query tool with 320+ extended functions for JSON transformation and analysis
jmespath-extensions
NOTE
This work has moved to https://github.com/joshrotenberg/jpx which includes a full JMESPath Specification
implementation with some performance improvements over the official crate, the full extensions (plus more) implemented here, a higher level "engine"
library that includes meta for both evaluation and function discovery, and the jpx CLI tool and the jpx-mcp MCP server.
No further development will be done on this repository.
Extended JMESPath with 400+ functions. Rust library and Python bindings.
Installation
Rust
[dependencies]
jmespath_extensions = "0.9"
Python
pip install jmespath-extensions
Usage
Rust
use jmespath_extensions::search;
use serde_json::json;
let data = json!({"items": [1, 2, 3, 4, 5]});
let result = search("sum(items)", &data)?;
assert_eq!(result, json!(15));
// String functions
let data = json!({"name": "alice"});
let result = search("upper(name)", &data)?;
assert_eq!(result, json!("ALICE"));
// Date functions
let result = search("format_date(now(), '%Y-%m-%d')", &json!({}))?;
// Array functions
let data = json!({"values": [1, 2, 2, 3, 3, 3]});
let result = search("unique(values)", &data)?;
assert_eq!(result, json!([1, 2, 3]));
Python
import jmespath_extensions as jmx
# Basic usage
data = {"items": [1, 2, 3, 4, 5]}
result = jmx.search("sum(items)", data)
assert result == 15
# String functions
result = jmx.search("upper(name)", {"name": "alice"})
assert result == "ALICE"
# Array functions
result = jmx.search("unique(values)", {"values": [1, 2, 2, 3]})
assert result == [1, 2, 3]
Function Categories
| Category | Examples |
|---|---|
| String | upper, lower, split, replace, camel_case, pad_left |
| Array | first, last, unique, chunk, zip, flatten, group_by |
| Math | round, sqrt, median, stddev, percentile |
| Date/Time | now, parse_date, format_date, date_add, date_diff |
| Hash | md5, sha256, hmac_sha256, crc32 |
| Encoding | base64_encode, base64_decode, hex_encode, url_encode |
| Regex | regex_match, regex_extract, regex_replace |
| Geo | haversine, geo_distance_km, geo_bearing |
| Network | cidr_contains, is_private_ip, ip_to_int |
| JSON Patch | json_patch, json_merge_patch, json_diff |
| Fuzzy | levenshtein, jaro_winkler, soundex, metaphone |
| Expression | map_expr, filter_expr, sort_by_expr, group_by_expr |
See docs.rs for the full function reference.
Related Projects
- jpx - CLI, MCP server, and query engine built on this library
- JMESPath - The query language specification
- jmespath.rs - Rust JMESPath implementation
License
MIT or Apache-2.0
관련 서버
Scout Monitoring MCP
스폰서Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
스폰서Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP Code Crosscheck
A server for bias-resistant AI code review using cross-model evaluation.
Package README MCP Servers
A collection of MCP servers for fetching READMEs from various package managers.
Narsil MCP
Blazingly fast 🔥 best in class MCP server in Rust 🦀 with neural engine, security profiling, and optional graph frontend
XcodeProj MCP Server
An MCP server for manipulating Xcode project files (.xcodeproj) using Swift. Requires Docker and macOS.
JavaScript Executor MCP Server
Execute JavaScript code in a modern runtime environment with support for various built-in modules.
ComfyUI MCP Server
Integrates ComfyUI with MCP, allowing the use of custom workflows. Requires a running ComfyUI server.
Gradio MCP Test
A Python-based MCP server that provides tools to get cat images, either as a direct PNG or a URL for Markdown display.
browser-devtools-mcp
A Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.
Cycode
Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning with Cycode.
AAP Enterprise MCP Server
An MCP server that allows AI assistants to interact with Ansible Automation Platform (AAP) and Event-Driven Ansible (EDA) infrastructure.