ruby-1.9.2-p0 > require 'json'
 => true 
ruby-1.9.2-p0 > hash = {hi: "sup", yo: "hey"}
 => {:hi=>"sup", :yo=>"hey"} 
ruby-1.9.2-p0 > hash.to_json
 => "{\"hi\":\"sup\",\"yo\":\"hey\"}"
ruby-1.9.2-p0 > j hash
{"hi":"sup","yo":"hey"}
 => nil 

j hash puts the answer I want but returns nil.

hash.to_json returns the answer I want with backslashes. I don't want backslashes.

Edit
Report