json-path /JsonPath

Java JsonPath implementation

★ 9,456⑂ 1,715👁 278⑃ 412● 675▤ 12
JavaApache-2.0Created 2011-01-24
下载:json-path-3.0.0json-path-3.0.0 ↓3.0.02026-02-22
+0
日增长
9,456
stars
1,715
forks
278
watchers
412
prs
675
issues
12
releases

README

Jayway JsonPath
=====================

A Java DSL for reading JSON documents.





Jayway JsonPath is a Java port of Stefan Goessner JsonPath implementation.

Getting Started
---------------

JsonPath is available at the Central Maven Repository. Maven users add this to your POM.

 [!NOTE]  
 Version 3.0.0 Uses Java 17 baseline to support Jackson 3

xml


    com.jayway.jsonpath
    json-path
    3.0.0



If you need help ask questions at Stack Overflow. Tag the
question 'jsonpath' and 'java'.

JsonPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination
with an XML document. The "root member object" in JsonPath is always referred to as $ regardless if it is an
object or array.

JsonPath expressions can use the dot–notation

$.store.book[0].title

or the bracket–notation

$['store']['book'][0]['title']

Operators
---------

| Operator                  | Description                                                     |
|:--------------------------|:----------------------------------------------------------------|
| $                       | The root element to query. This starts all path expressions.    |
| @                       | The current node being processed by a filter predicate.         |
|                        | Wildcard. Available anywhere a name or numeric are required.    |
| ..                      | Deep scan. Available anywhere a name is required.               |
| .                 | Dot-notated child                                               |
| ['' (, '')] | Bracket-notated child or children                               |
| [ (, )] | Array index or indexes                                          |
| [start:end]             | Array slice operator                                            |
| [?()]       | Filter expression. Expression must evaluate to a boolean value. |

Functions
---------

Functions can be invoked at the tail end of a path - the input to a function is the output of the path expression.
The function output is dictated by the function itself.

| Function    | Description                                                                          | Output type          |
|:------------|:-------------------------------------------------------------------------------------|:---------------------|
| min()     | Provides the min value of an array of numbers                                        | Double               |
| max()     | Provides the max value of an array of numbers                                        | Double               |
| avg()     | Provides the average value of an array of numbers                                    | Double               | 
| stddev()  | Provides the standard deviation value of an array of numbers                         | Double               | 
| length()  | Provides the length of an array                                                      | Integer              |
| sum()     | Provides the sum value of an array of 

Top issues

Latest release

json-path-3.0.0 json-path-3.0.0 2026-02-22
What's Changed
 adding jackson3 provider (1066) by @bsa01 in https://github.com/json-path/JsonPath/pull/1067
 Prepare Version 3.0.0 - Java 17 baseline with Jackson 3 by @kallestenflo in https://github.com/json-path/JsonPath/pull/1072

 New Contributors
 @bsa01 made their first contribution in https://github.com/json-path/JsonPath/pull/1067

Full Changelog: https://github.com/json-path/JsonPath/compare/json-path-2.10.0...json-path-3.0.0

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON