escape hidden character that is causing JSON validation to fail
<p>I have a hidden character that is causing JSON parsing to fail. What is the best way to escape a string properly just that hidden characters like these done crash my json?</p>

<p>Here is the code, the invisible character is between the n and the s in "brains" until you remove that invisible character JSON.parse() will fail... question is, how to strip the invisible character?</p>

<pre><code>var mystring='{"invis":"their brains process differently"}';
console.log("cool" + mystring);
console.log(JSON.parse(mystring));
</code></pre>

<p>Note I found that in the above code actually removed the invisible character, but it is here on pastie, if you want to copy and paste to see the issue:
<a href="http://pastie.org/1485072" rel="nofollow">See the code on pastie</a></p>
