Yq

From Omnia
Revision as of 23:28, 25 February 2024 by Kenneth (talk | contribs) (Created page with "== yq == yq is a lightweight and portable command-line YAML processor https://mikefarah.gitbook.io/yq/ a lightweight and portable command-line YAML processor. yq uses jq like syntax but works with yaml files as well as json. It doesn't yet support everything jq does - but it does support the most common operations and functions, and more is being added continuously. yq is written in go - so you can download a dependency free binary for your platform and you are go...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

yq

yq is a lightweight and portable command-line YAML processor
https://mikefarah.gitbook.io/yq/
a lightweight and portable command-line YAML processor. yq uses jq like syntax but works with yaml files as well as json. It doesn't yet support everything jq does - but it does support the most common operations and functions, and more is being added continuously.
yq is written in go - so you can download a dependency free binary for your platform and you are good to go! If you prefer there are a variety of package managers that can be used as well as docker, all listed below.

Convert YAML to JSON

yq eval file.yaml -o json
yq e file.yaml -o j