A Java DSL for reading, querying, and manipulating JSON documents using XPath-like expressions.
Jayway JsonPath is a Java library that implements the JsonPath specification, allowing developers to query and manipulate JSON documents using a concise, XPath-like syntax. It solves the problem of navigating complex JSON structures by providing a domain-specific language to extract specific data points, filter arrays, and compute aggregates directly within path expressions.
Java developers working with JSON APIs, data processing pipelines, or any application that requires efficient querying and extraction of data from JSON documents.
Developers choose JsonPath for its robust, standards-based implementation of JsonPath in Java, offering a rich feature set with multiple JSON provider integrations, extensive configuration options, and a fluent API that simplifies complex JSON queries without sacrificing performance or flexibility.
Java JsonPath implementation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports dot and bracket notation with operators like wildcards, deep scans, slices, and filter predicates, enabling concise navigation of complex JSON structures similar to XPath.
Works with multiple JSON libraries such as Jackson, Gson, and JsonSmart via its SPI, allowing teams to leverage existing dependencies without vendor lock-in.
Includes functions like min(), max(), avg(), and length() that compute values directly in path expressions, reducing the need for external processing code.
Can map query results to POJOs using providers like JacksonMappingProvider, ensuring seamless integration with Java objects and reducing boilerplate casting.
Advanced features like custom predicates, cache SPI, and provider switching require manual setup and deep understanding of JsonPath's internals, as noted in the README's tweaking section.
For straightforward JSON access, the abstraction layer adds parsing and evaluation costs compared to direct library usage, especially without caching enabled.
Primarily focused on querying; while it supports setting values, it lacks comprehensive JSON manipulation features like schema validation or full document restructuring.