跳到主要内容
Z

JSONPath 测试工具

在你的 JSON 数据上测试 JSONPath 表达式。实时计算引擎会同时返回 path 和 value,并支持 filter、slice、recursive descent。

免费 无需注册 客户端运行 注重隐私 Updated
正在计算…

提示: $..book[?(@.price < 10)], $.store.book[0,2], $..author

个匹配结果

Path
没有匹配结果。

使用方法

  1. 1 将你的 JSON 粘贴到上方的输入框中。
  2. 2 输入 JSONPath 表达式——同时支持方括号(bracket)和点号(dot notation)两种写法。
  3. 3 结果会实时更新。可在下拉菜单中选择只显示 path、只显示 value,或两者都显示。
  4. 4 将整个结果集复制为 JSON 格式。

为什么使用此工具

  • 基于 <code class="font-mono text-xs">jsonpath-plus</code> 构建——支持 filter、recursive descent、slice 等多种功能。
  • 实时计算——无需点击提交按钮。
  • 完全在浏览器端运行——你的 JSON 数据始终留在本地。
  • 相关库仅在首次计算时按需加载。

常见问题

支持哪种 JSONPath 方言(dialect)?

采用 Goessner 风格的 JSONPath,并由 jsonpath-plus 进行扩展。filter <code class="font-mono">?(@.price &lt; 10)</code>、recursive descent <code class="font-mono">..</code>、slice <code class="font-mono">[0:5]</code> 以及 union <code class="font-mono">[0,2,4]</code> 均可正常使用。

为什么我的表达式没有返回任何结果?

请检查根节点(root)部分,表达式必须以 <code class="font-mono">$</code> 开头。含有特殊字符的 key 需要用引号括起来,例如 <code class="font-mono">$["my-key"]</code>。

有哪些相关工具?

<a class="text-brand-600 hover:underline" href="/json-formatter">JSON Formatter</a> 可在查询前先美化格式;<a class="text-brand-600 hover:underline" href="/xpath-tester">XPath Tester</a> 适用于 XML / HTML。

什么是 JSONPath 测试工具?

JSONPath 测试工具是一款在 JSON 文档上计算 JSONPath 表达式并展示匹配结果的工具。它会实时执行查询,为每个匹配结果同时返回 path 和 value,并支持 filter、slice 和 recursive descent,方便遍历嵌套数据。整个过程完全在浏览器端完成,开发者无需将 JSON 发送到服务器即可测试和调整 JSONPath 查询。

功能特性

Live evaluation

Type an expression and see matches update instantly against your JSON.

Filters, slices & recursion

Supports [?()] filters, [start:end] slices, wildcards, and the .. recursive-descent operator.

100% private

Queries run client-side — your JSON is never uploaded.

示例

Input

JSON: {"store":{"book":[{"price":8.95},{"price":12.99}]}}   ·   Path: $.store.book[*].price

Output

[8.95, 12.99]

常见使用场景

  1. 1

    Extract nested values

    Pull every price, id, or field from a deep JSON payload with one expression.

  2. 2

    Prototype API mappings

    Refine the JSONPath a workflow tool (n8n, Zapier) will use before wiring it up.

  3. 3

    Debug a query

    Confirm exactly which nodes a JSONPath matches on real data.

概要

Zerethon's JSONPath tester evaluates JSONPath expressions against a JSON document live in your browser, returning both the path and value of each match. It supports filters, array slices, wildcards, and recursive descent for navigating nested data. Nothing is uploaded — the JSON and query stay on your device.

分类
开发者
价格
免费
隐私
基于浏览器
注册
无需

References

隐私

除非另有说明,否则你的数据永远不会离开浏览器。JSONPath 测试工具 完全在客户端运行 — 无需上传服务器,不记录日志,不追踪你输入的内容。

了解基础知识

相关工具

在 Zerethon Social 上创作、分享与成长

免费注册。赚取积分,收集成就,与全球创作者建立联系。

免费试用 Zerethon