Created
December 5, 2015 03:50
-
-
Save rothwerx/f1843fe5e295f0c18d21 to your computer and use it in GitHub Desktop.
Python: YAML to JSON preprocessor
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
#!/usr/bin/env python | |
import yaml | |
import json | |
import sys | |
with open(sys.argv[2], "w") as outf, open(sys.argv[1]) as inf: | |
o = yaml.safe_load(inf) | |
json.dump(o, outf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment