Skip to content

Instantly share code, notes, and snippets.

@rothwerx
Created December 5, 2015 03:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rothwerx/f1843fe5e295f0c18d21 to your computer and use it in GitHub Desktop.
Python: YAML to JSON preprocessor
#!/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