title: How do I convert a Hash to a JSON string in Ruby 1.9?
body: <pre><code>ruby-1.9.2-p0 &gt; require 'json'
   =&gt; true 
  ruby-1.9.2-p0 &gt; hash = {hi: "sup", yo: "hey"}
   =&gt; {:hi=&gt;"sup", :yo=&gt;"hey"} 
  ruby-1.9.2-p0 &gt; hash.to_json
   =&gt; "{\"hi\":\"sup\",\"yo\":\"hey\"}"
  ruby-1.9.2-p0 &gt; j hash
  {"hi":"sup","yo":"hey"}
   =&gt; nil 
  </code></pre>
  
  <p><code>j hash</code> puts the answer I want but returns <code>nil</code>.</p>
  
  <p><code>hash.to_json</code> returns the answer I want with backslashes. I don't want backslashes.</p>