JSONPath

A small expression language for picking values out of a JSON document, such as $.id for the id field of the top-level object.

In more detail

A JSONPath expression starts at $, the root of the document, and walks down through field names and array positions. It lets a test or tool check one field without handling the whole document. RFC 9535 standardises the syntax.

Example

MockMvc: .andExpect(jsonPath("$.id").value("one"))

Related terms

Taught in

References