Skip to main content
4 events
when toggle format what by license comment
Feb 23, 2021 at 12:23 comment added Tran Nguyen @TmTron Thanks for the comments, this was a 4 years old answer and things have changed a lot. JSON is now being used everywhere in many API thus I don't think this original question is still relevant to ask. However, I should update my answer that this is only true when you are calling the API from a webpage using XMLHttpRequest or via jQuery. Who still use jQuery nowadays right?
Oct 6, 2020 at 8:39 comment added TmTron I don't see why this should increase security. Whatever you get from the server is a string and you can JSON.parse() it. Since your first example is also not valid JSON, parsing will fail: e.g. JSON.parse("[1, alert('You are hacked!'), 'abc']")
Mar 10, 2016 at 2:22 review First posts
Mar 16, 2016 at 7:21
Mar 10, 2016 at 2:21 history answered Tran Nguyen CC BY-SA 3.0