yaml2json

Convert YAML files to JSON format from the command line.

brewmacoslinux
Try with needOr install directly
Source

About

Command-line tool convert from YAML to JSON

Commands

yaml2json

Examples

convert YAML file to JSON$ yaml2json input.yaml
convert YAML and save to JSON file$ yaml2json input.yaml > output.json
convert YAML from standard input$ cat config.yaml | yaml2json
pretty print converted JSON output$ yaml2json input.yaml | jq .
convert multiple YAML files to JSON$ for file in *.yaml; do yaml2json "$file" > "${file%.yaml}.json"; done