Running Firefox 23.0.1, I have the following snippet:
var foo = '{ "success": false, "errtype": "barf", "message": "my message\n"}';
var what = JSON.parse(foo);
console.log(what);
Running this in the Firebug Javascript window, or watching the console log from my web page, I get SyntaxError: JSON.parse: bad control character in string literal.
But this seems like valid JSON to me, per http://www.json.org/ and it also passes the validator here: http://jsonlint.com/.
When I remove the "\n" embedded at the end of "my message", the problem in Firefox goes away. Haven't tried other browsers.
Is this a bug in Firefox?