require 'json' File.open("filename.json", "w") do |f| f.write(JSON.pretty_generate(my_hash)) end
require 'json' my_hash = JSON.parse('{"hello": "goodbye"}') puts my_hash["hello"] => "goodbye"