JSON on IE6 (IE7)

Sorry for my adversity, but after going to bed for a few weeks and just launching my internet online, I just don't have any energy to debug ... I just can't google implement JSON on IE6 and IE7 ... I use

JSON.stringify(...) 

From what I understand, JSON is not embedded in IE6-7 and should be dynamically added to the embedded code ... how do you do this?

I already have jQuery - do I understand correctly that their JSON engine relies on its own browser?

Then some comments on the invalid JSON code that make IE6-7 fail, but I thought it was not native in IE6-7?

Is anyone

+76
json internet-explorer internet-explorer-7 internet-explorer-6
Mar 23 '10 at 20:01
source share
4 answers

Since you want to use the JSON.stringify method, you will need to enable the parser

+103
Mar 23
source share

There must be something incomprehensible. Object notation has been in JavaScript for a while (as far as I understand, this is the basic concept of JavaScript). I mean, the ability to write code like var o= {a:"b"};
So, if you can do this, you can also call eval('var o= {a:"b"};') and how you "implement JSON" in any browser.

UPDATE: re-read the message and finally come to the conclusion that the problem is serializing objects, not deserializing them. Then you can use the JavaScript library for this: https://github.com/douglascrockford/JSON-js/blob/master/json2.js

+2
Mar 23 '10 at 20:05
source share

Just include json2.js in your file to play with JSON. It will also work in IE 9.

+2
Jul 09 '13 at 9:55 on
source share

"dynamically added embedded code" uses the functionality of the Douglas Crockfords json2 library or its own jQuery implementation if the browser version does not support it natively.

jQuery does not rely on any JSON decoding features provided by the browser. If the browser supports JSON decoding, then jQuery will use it.

+1
Mar 23 '10 at 20:11
source share



All Articles