|
|
|
|
|
by ajross
5479 days ago
|
|
I gotta ask: that just sounds wrong to me. The fact that it used a built-in parser was supposed to have been a feature of JSON. Have we pedantricized that into a bad thing now too? What's the disadvantage of "allowing invalid JSON" in an application protocol you control? Likewise, what's the value of valid JSON (I honestly don't know what the example here is) that can't be parsed by a Javascript interpreter? And where does the "huge security hole" come from? I certainly hope you're not saying that you trust requests generated by client code... |
|
eval'ing a response from a third party essentially runs their code in your context. JSON.parse does not.