Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 1.11 KB

File metadata and controls

26 lines (18 loc) · 1.11 KB

JQ/YQ

    go install github.com/itchyny/gojq/cmd/gojq@latest

    cat foo.yaml | gojq --yaml-input '.' > foo.json   # convert YAML to JSON
    cat foo.json | gojq --yaml-output '.' > foo.yaml  # convert JSON to YAML

    cat foo.json | gojq -r tostring > minified.json   # minify JSON
    cat minified.json | gojq > foo.json               # unminify JSON

    cat radios/stubs.yaml 1.yaml 2.yaml ... n.yaml | gojq --yaml-input -s -f radios/merge.jq

Piping