When I call JSON.stringify() on a complex object in JavaScript, it produces a string with lots of escape sequences (\\\", \\\\\", etc.).
How can I make it create a h
JSON.stringify(value[, replacer[, space]])
Space: A String or Number object that's used to insert white space into the output JSON string for readability purposes.
Replacer: A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string.
So you can do
var x = {"name":"void", "type":"O'\"Rielly"};
document.write(JSON.stringify(x, null, ' '));