Skip to content

Instantly share code, notes, and snippets.

@vlandham
Created September 24, 2013 21:57
Show Gist options
  • Save vlandham/6691867 to your computer and use it in GitHub Desktop.
Save vlandham/6691867 to your computer and use it in GitHub Desktop.
ruby out to json
output_filename = 'out.json'
data = []
File.open(output_filename, 'w') do |file|
file.puts JSON.pretty_generate(JSON.parse(data.to_json))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment