Ruby Escreva JSON para arquivar

require 'json'
File.open("filename.json", "w") do |f|
  f.write(JSON.pretty_generate(my_hash))
end
Nice Nightingale