Yoryantra
← Back to Tools

JSONPath Tester

Test an RFC 9535 JSONPath subset against JSON and inspect the ordered matched nodes and normalized paths.

Supported here

Root $, dot-name shorthand, quoted bracket names, wildcards, indices including negative indices, slices including negative steps, descendant segments, selector unions, existence filters, and one primitive comparison per filter.

Try a query

Complete RFC filter logic such as &&, ||, negation, nested logical expressions, and function extensions such as length() are deliberately rejected rather than approximated.
Matched node values, normalized result paths, selector interpretation, and precision warnings will appear here.
JSON parsing and JSONPath evaluation run on the supplied text in your browser. The data is not sent to a query API. JSON input above 2,000,000 characters and path input above 20,000 characters are stopped before evaluation to avoid an unnecessarily heavy browser operation. Site-wide analytics or advertising scripts, if enabled, are separate from this operation.

JSONPath Selects Nodes and Locations, Not Just “Whatever Value Comes Back”

JSONPath is a query language over a JSON value viewed as a tree of nodes. A result is an ordered nodelist. Every matched node has both a value and a location inside the original JSON tree.

That distinction matters when two different fields both contain 19.95. Returning the scalar alone loses which one was selected. The result view therefore displays normalized paths such as $['store']['book'][0]['price'] beside the value.

Dot Notation Is Convenient Input; Bracket Notation Is the Stable Result Form

Input query
$.store.book[0].title

Normalized result path
$['store']['book'][0]['title']

RFC 9535 defines Normalized Paths with bracket notation, single quotes for member names, and non-negative array indices. A negative query such as $[-1] can therefore return a result path such as $[2] when the matched array has three items.

Normalized paths work well in test fixtures and debugging because each one identifies one specific node in that particular JSON value.

An Empty Result Is Different From null, false, 0, or an Empty String

If $.user.middleName finds no such member, the result is an empty nodelist. If the member exists and its JSON value is null, the result contains one node whose value is null. The same distinction applies to false, zero, and empty strings.

This is one reason a JSONPath tester should report match count and paths rather than showing only a formatted JSON value.

Selector Unions Can Select the Same Node More Than Once

JSONPath nodelists are ordered and can contain duplicate nodes. Querying the same member or index through two selectors does not require an implementation to silently turn the result into a set.

Yoryantra preserves duplicate result entries and warns when their normalized paths repeat. Deduplicate only when your consuming workflow specifically wants set-like behavior.

Array Slices Are Directional—and Step Zero Selects Nothing

[1:5:2] walks forward from index 1 and selects indices 1 and 3. [5:1:-2] walks backward and selects 5 and 3.[::-1]reverses an array's nodes.

RFC 9535 makes one behavior especially explicit: a slice step of 0selects no elements. It is not a syntax error and does not behave like Python's slice exception.

Descendant Selection Can Expand a Query Much More Than It Looks

$..price visits descendants and selects matching price members at multiple depths. On a small API response that is handy. On deeply nested or very large JSON, descendant queries can examine many nodes and return values that belong to unrelated parts of the document.

Prefer a more specific child path when you already know the structure and need a predictable business field rather than a broad discovery query.

Filters Are Where “Supports JSONPath” Stops Being a Precise Claim

RFC 9535 defines a full logical-expression grammar and standardized function-extension mechanism. Many older libraries predate that standard and support different operators, scripting expressions, or host-language callbacks.

The browser implementation deliberately keeps a smaller filter layer: an existence query such as ?@.isbn or one primitive comparison such as ?@.price < 10. It rejects logical operators and function extensions rather than silently giving them non-standard meaning.

JavaScript Number Precision Can Affect a Perfectly Valid JSONPath Comparison

JSON can contain integer or decimal tokens whose exact mathematical value is outside the precision of JavaScript's Number type. This tool uses the browser's JSON parser, so a filter comparing those values inherits that numeric representation.

The source is scanned for suspicious numeric tokens, with a warning before you trust a comparison involving very large identifiers or high-precision decimal data. If exact decimal/integer semantics matter, use a JSONPath implementation backed by the numeric model required by your application.

RFC 9535: JSONPath is directly relevant because JSONPath became an IETF Standards Track specification in 2024. It defines selectors, slices, filters, nodelists, descendant segments, and Normalized Paths. The implemented filter subset is stated explicitly instead of claiming full RFC coverage.