ruby write json to file code example
Example: ruby write json to file
require 'json'
File.open("filename.json", "w") do |f|
f.write(JSON.pretty_generate(my_hash))
end
require 'json'
File.open("filename.json", "w") do |f|
f.write(JSON.pretty_generate(my_hash))
end