6 releases
Uses new Rust 2024
| new 0.2.1 | Feb 28, 2026 |
|---|---|
| 0.2.0 | Feb 24, 2026 |
| 0.1.3 | Feb 11, 2026 |
#10 in #jmespath
Used in 3 crates
(via jpx-engine)
1MB
29K
SLoC
jpx-core: A complete JMESPath implementation using serde_json::Value.
This crate provides a JMESPath parser, interpreter, and runtime that works
directly with serde_json::Value, eliminating the need for a separate
Variable type and the conversion overhead that comes with it.
Quick Start
use jpx_core::compile;
use serde_json::json;
let expr = compile("foo.bar").unwrap();
let data = json!({"foo": {"bar": true}});
let result = expr.search(&data).unwrap();
assert_eq!(result, json!(true));
jpx
JMESPath CLI and tools with 400+ extended functions - a powerful jq alternative.
This repository contains the jpx ecosystem:
| Package | Description |
|---|---|
| jpx | CLI tool with REPL, multiple output formats |
| jpx-mcp | MCP server for AI assistants |
| jpx-engine | Query engine with introspection and discovery |
Quick Start
# Install
brew install joshrotenberg/brew/jpx
# or: cargo install jpx
# Use it
echo '{"name": "world"}' | jpx 'upper(name)'
# "WORLD"
curl -s https://api.github.com/users/octocat | jpx '{
login: login,
created: format_date(parse_date(created_at), `%B %Y`)
}'
# {"login": "octocat", "created": "January 2011"}
Docker
# CLI
echo '{"name": "world"}' | docker run -i ghcr.io/joshrotenberg/jpx 'upper(name)'
# MCP Server
docker run -i --rm ghcr.io/joshrotenberg/jpx-mcp
MCP Server
Give Claude (or any MCP client) the ability to query and transform JSON:
{
"mcpServers": {
"jpx": {
"command": "jpx-mcp"
}
}
}
Tools: evaluate, batch_evaluate, validate, functions, describe, search, similar, format, diff, patch, merge, stats, paths, keys
Function Categories
The library provides 400+ functions across these 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 the documentation for the full function reference.
Acknowledgments
- JMESPath - The query language specification
- jmespath.rs - Rust implementation by @mtdowling
- jpx-core - JMESPath implementation with 400+ extension functions
License
MIT or Apache-2.0
Dependencies
~0.5–7MB
~112K SLoC