I\'m working with configuration files so I need to convert JSON to YAML. For example I have this JSON file:
{ "foo": "bar", "baz&
Here's a one liner for a file, suitable for sticking in a bash script. This should work on most default pythons on most systems:
python -c 'import json; import yaml; print(yaml.dump(json.load(open("inputfile"))))'