Skip to content
uencoder

JSONPath

JSONPath is an XPath-like query language proposed by Stefan Gössner that selects nodes from JSON documents with $..key expressions.

Purpose

To batch-select and filter nodes in JSON documents by path expressions for API queries, configuration extraction, and data transformation.

Mechanism

An expression starts at $: .key selects a child, [n] selects an array element, ..key searches recursively, and [?filter] filters. The evaluator walks the document matching the expression and produces a node list.

Use cases

  • Selecting REST API fields
  • Extracting JSON configuration
  • Data transformation pipelines

Related tools

References