Skip to content

Instantly share code, notes, and snippets.

@davepeck
Created March 3, 2011 00:18
Show Gist options
  • Save davepeck/852073 to your computer and use it in GitHub Desktop.
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.
#!/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