yq/pkg/yqlib/doc/usage/headers/convert.md
2022-01-21 20:26:19 +11:00

320 B

JSON

Encode and decode to and from JSON. Note that YAML is a superset of JSON - so yq can read any json file without doing anything special.

This means you don't need to 'convert' a JSON file to YAML - however if you want idiomatic YAML styling, then you can use the -P/--prettyPrint flag, see examples below.