JSON on IE6 (IE7)

后端 未结 4 906
甜味超标
甜味超标 2020-11-28 04:25

Sorry for my inpatience but after weeks staying up late and just having put my web online, I just don\'t have any left energy to debug... I just can\'t Google how to impleme

4条回答
  •  广开言路
    2020-11-28 05:08

    There must be something misunderstood. The object notation has been in JavaScript for a while now (as far as I understand, it's a core 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 that's the way you "implement JSON" in any browser.

    UPDATE: Re-read your post and finally got the point that the problem is serializing objects, not deserializing them. Then you can use the JavaScript library for that: https://github.com/douglascrockford/JSON-js/blob/master/json2.js

提交回复
热议问题