Skip to content

Instantly share code, notes, and snippets.

Forked from sbp/
Created August 11, 2018 20:11
What would you like to do?
Convert JSON to YAML
export PYTHONPATH=$HOME/usr/opt/pyyaml/lib/python2.6/site-packages
python -c '
import sys, json, yaml
with open(sys.argv[1]) as f:
print yaml.safe_dump(json.load(f), default_flow_style=False)
' $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment