Rails decode json with \u0022 character fail
<p>I would like to decode a json string with a <code>\u0022</code> character in it.</p>

<p>I am successful with: </p>

<pre><code>&gt;&gt; ActiveSupport::JSON.decode("{\"json\":{\"difficulty\":1}}")
=&gt; {"json"=&gt;{"difficulty"=&gt;1}}
</code></pre>

<p>But fail with: </p>

<pre><code>&gt;&gt; ActiveSupport::JSON.decode("{\"json\":{\"difficulty\":\"test\\u0022test\"}}")
StandardError: Invalid JSON string
from /home/.../.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/json/backends/yaml.rb:14:in `decode'
from /home/.../.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/json/decoding.rb:14:in `__send__'
from /home/.../.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/activesupport-2.3.15/lib/active_support/json/decoding.rb:14:in `decode'
from (irb):11
</code></pre>

<p>I would love to replace the <code>\u0022</code> character with another one, but I can't do it because it's inside the parameters parsing process of rails when the app receives a request; except if I override the json decode chore method, which I would prefer to avoid.</p>

<p>FYI : I'm on Ruby 1.8.7-p358 &amp; Rails 2.3.15 &amp; I can't change that.</p>