Created
October 22, 2015 00:21
-
-
Save chmarr/e9d692032a2cee03b9eb to your computer and use it in GitHub Desktop.
Convert YAML file to JSON
This file contains hidden or 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
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)Dtex-Mac23:tmp ccogdon$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment