Created
January 12, 2015 16:20
-
-
Save bcoca/9fb7af4a4b26ae3a03d5 to your computer and use it in GitHub Desktop.
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 | |
from yaml import load | |
try: | |
from simplejson import dump | |
except ImportError: | |
from json import dump | |
try: | |
from yaml import CLoader as Loader | |
except ImportError: | |
from yaml import Loader | |
data = load(sys.stdin.read(), Loader=Loader) | |
dump(data, sys.stdout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment