While it's commonly understood that JSON.parse() helps prevent attackers from injecting JavaScript into responses, this question delves into a different aspect. If an attacker manages to hijack your Ajax call and insert JavaScript, wouldn't they also potentially have the ability to infiltrate your webpage and execute malicious scripts there as well?
Opting for JSON.parse() over eval() is generally a safer choice, although adding a JSON parser might be necessary in some cases. But in scenarios where your web page and Ajax call come from the same host, does using JSON.parse() truly provide added security?