Transform YAML into JSON for downstream tools.
Section: Read and query YAML with yq
Convert YAML to JSON
bash
bash
yq -o=json '.' config.yamlExplanation
Helpful when piping YAML into tools that only understand JSON.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Read and query YAML with yq