Created
March 9, 2012 23:23
-
-
Save insom/2009264 to your computer and use it in GitHub Desktop.
ENC to convert JSON to YAML
This file contains 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 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