-
-
Save Exceen/318e4b4092d25f01e08db2b491355ad6 to your computer and use it in GitHub Desktop.
Convert JSON to YAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
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