There's an implementation of JSONPath for Java, too, written by Jayway. It's available from GitHub, or you can obtain it through the Central Maven Repository if your project uses the Maven build system. It matches the original JSONPath API, returning Java objects and collections for fields in JSON objects.
You'll need to either download the code from GitHub at https://github.com/jayway/JsonPath, or, if you're using Maven as your build system, include the following dependency:
<dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>2.0.0</version> </dependency>
The Java implementation parses your JSON and exports a J
sonPath class with a method ...