Convert a Ruby Hash into JSON (without escape characters) Convert a Ruby Hash into JSON (without escape characters) ruby ruby

Convert a Ruby Hash into JSON (without escape characters)


These escape characters escape " in Ruby String (your my_hash.to_json output). If you do

puts my_hash.to_json

you'll see that actually these escape characters aren't added to output string.