Parsing string as JSON with single quotes?
<p>I have a string  </p>

<pre><code>str = "{'a':1}";
JSON.parse(str);
VM514:1 Uncaught SyntaxError: Unexpected token '(…)
</code></pre>

<p>How can I parse the above string (str) into a JSON object ?</p>

<p>This seems like a simple parsing. It's not working though.</p>