Use better string replace method for newlines.

This doesn't work:

JSON.parse('{"a":"bla\nblu\nbb"}'.replace('\n', '\\n', 'g'))

The flag "m - match over multiple lines" is non standard and doesn't work in chrome.

However, this works:

JSON.parse('{"a":"bla\nblu\nbb"}'.replace(/\n/g, '\\n'))

Javascript is fun :)