Skip to content

Instantly share code, notes, and snippets.

@mtodd
Created Nov 13, 2011
Embed
What would you like to do?
PrettyPrint JSON
require 'rubygems'
require 'yajl/json_gem' # or 'json'
require 'yaml'
puts JSON.parse($stdin.read.chomp).to_yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment