Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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