Resolve JSON is Undefined Error in Internet Explorer

While running JSON code like the one shown below, older browsers like IE7 produces the error - ‘JSON’ is undefined:

The error occurs while executing the JSON.parse() method by older browsers that have not implemented the JSON object. The solution to this error is to download the json2 library and include it in your script, as shown below:

The application uses the json2.js library for browsers that haven’t implemented the JSON object yet. After adding the json2.js library, you can now test the application on IE7 and you will get the desired output