Created
March 3, 2011 00:18
-
-
Save davepeck/852073 to your computer and use it in GitHub Desktop.
My dumb script to convert yaml files to json files. Use stdin/stdout.
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
#!/usr/bin/env python | |
import sys | |
import yaml | |
import json | |
# Assumed we want to use stdin and stdout | |
print json.dumps(yaml.load(sys.stdin.read()), indent=4) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment