Ajax JSON.stringify IE7 problem

Just a tip up front.  IE7 runs an older script engine than IE8 and has no full support for Json.

So your code that calls JSON.stringify does not work.

The remedy is to include json2.js from https://github.com/douglascrockford/JSON-js/blob/master/json2.js.  It does not interfere with IE8+.  Just download the file (the “raw” button – saveas) to your script lib and include as so:

<script src="Script/json2.js"; type="text/javascript"></script><!-- Needed for IE7. -->

Running IE9 in compatibility mode does not make this error appear – it seems like IE9-in-IE7-mode is running a newer script engine.

That impediment avoided you are free to continue adding value to your site.

Tags: , , , , , ,

2 Responses to “Ajax JSON.stringify IE7 problem”

  1. sp says:

    Excellent. It worked!

  2. Vimal says:

    Hi,

    You have made my day!!!!…

    This has solved my problem.

    Keep posting…

    Many Thanks,

Leave a Reply to sp