Created
September 24, 2013 21:57
ruby out to json
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
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