JSON path language
JSONPath is a query language and expression syntax for navigating, selecting, and extracting values from hierarchical JSON documents.
BDD in Action, Second Edition
A JSONPath expression is a query expression for selecting or evaluating values within JSON data.
- How it is used
- Supports API acceptance tests by selecting expected values from REST responses without exercising the user interface.
- How deep it goes
- Demonstrates scalar, nested, typed, object, and collection extraction but does not develop JSONPath grammar or implementation internals.
- Examples
- Uses frequent-flyer registration, passport lookup, and flight-history extraction as concrete query examples.
- What you can do after
- Apply it via Rest Assured to extract scalar values, nested objects, or collections from API responses.
Read how BDD in Action, Second Edition explains JSON path language →
Automating API Delivery
A JSONPath expression is a query expression that selects or navigates elements in a JSON document.
- How it is used
- Locates OpenAPI definition elements for Spectral rules that automate API style-guide checks.
- How deep it goes
- Defines root and child navigation, then works through rule targets and JSONPath Plus path-name selection without developing a full query-language reference.
- Examples
- Uses `$.info`, `$.paths[*]~`, and `$.paths[*].get.operationId` to target descriptions, URI paths, and GET operation IDs.
- What you can do after
- Apply it via Spectral to target linting checks, and test JSONPath Plus selections with `jpp` before running a rule.
Read how Automating API Delivery explains JSON path language →
The Design of Web APIs, Second Edition
JSONPath is a query language and expression syntax for selecting and extracting values from JSON-like hierarchical data.
- How it is used
- Targets OpenAPI elements for Spectral rules that automate API design guidelines and prevent avoidable authoring problems.
- How deep it goes
- Explains root, child, wildcard, recursive, union, and conditional selectors, then demonstrates validation against realistic OpenAPI documents.
- Examples
- Uses paths for query parameters, path parameters, POST and PUT responses, API versions, and camel-cased parameter names.
- What you can do after
- Build and verify Spectral targets that select intended OpenAPI elements before applying linting functions.
Read how The Design of Web APIs, Second Edition explains JSON path language →
Related concepts
- linter ruleused by · A linter rule is a configurable condition applied by a linter to detect or enforce specified patterns or constraints in code or other artifacts.
- Spectralused by · Spectral is an open-source linter that applies configurable rules to JSON, YAML, and structured API description documents.
- XPathcontrasts with · XPath is a W3C language for navigating and selecting nodes in XML and other structured document trees.
- REST Assuredused by · REST Assured is a Java library for testing RESTful web services through programmatic HTTP requests and response assertions.
- api calluses · An API call is a programmatic request or invocation through an application programming interface to access data or invoke an operation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


