Skip to content

Instantly share code, notes, and snippets.

@insom
Created March 9, 2012 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insom/2009264 to your computer and use it in GitHub Desktop.
Save insom/2009264 to your computer and use it in GitHub Desktop.
ENC to convert JSON to YAML
#!/usr/bin/env ruby
require 'net/http'
require 'JSON'
require 'YAML'
url = "http://localhost:8000/hosting/json/#{ARGV[0]}/"
r = Net::HTTP.get_response(URI.parse(url))
o = JSON.parse(r.body)
puts o.to_yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment