We all know that we can't use double quotes within double quotes:
var str = ""hello"";
//this will result in an invalid string
However, when I stringify an object like this
var obj = {"name":"abc"}
var str = JSON.stringify(obj).
str // outputs "{"name":"abc"}"
This is technically valid, but it seems a bit odd. Is there some sort of exception in JavaScript when it comes to stringifying JSON objects without proper string validations?
Thank you in advance.