Reading time: 4 – 6 minutes
Just a cookbook about how to get a YAML file when you have a JSON one.
python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml
1 thought on “Convert JSON file to YAML file using CLI”
I agree with your point of view, your article has given me a lot of help and benefited me a lot. Thanks. Hope you continue to write such excellent articles.
Comments are closed.