Skip to content
William W. Kimball, Jr., MBA, MSIS edited this page Feb 8, 2020 · 24 revisions

YAML Path

The README file touches on all of the major aspects of this YAML Path project. This Wiki provides a deeper dive into some of them. We'll start with a restatement of just what YAML Path is.

What is a YAML Path?

A YAML Path is a human-friendly means of identifying or searching for one or more nodes within YAML, EYAML, or compatible data structures like JSON. The core idea here is to make it easy to find or change the data users need from the command-line, other text input, or Python API. In fact, multiple representations of YAML Paths are supported, enabling users to express paths in whatever way is most intuitive to them.

Wait... did you say JSON? Yes; any valid JSON is also valid YAML, so YAML Paths also work perfectly well against JSON data.

What is YAML Path For?

At its inception, the YAML Path project was created for two primary reasons:

  1. Standardize the most intuitive way to describe nodes -- the complex keys and values -- in YAML and JSON data, and
  2. Make trivial a means of accessing and editing YAML and JSON data, notably from the command-line.

For the first objective, guidance was taken from sources like Puppet's Hiera engine and the W3C XPath standard. For the second, considerable expertise in command-line and file parsing was applied toward implementing this YAML Path standard via as simple an API as possible. This project also supplies reference command-line implementations of the API, enabling YAML Path consumers to try it out right away.

Clone this wiki locally