jQuery uses (new Function("return " + data))(); instead of eval(data); to parse JSON, why?
- by Luca Matteis
This link shows you that jQuery uses (new Function("return " + data))(); for older browsers, to parse a JSON string instead of eval().
What are the benefits of this? What if the JSON string isn't safe?