JSON Parse Error on Internet Explorer

前端 未结 3 1363
你的背包
你的背包 2021-01-21 02:25

I\'m using a jscript to retrieve JSON data from Flickr. Works 100% in every browsers except IE.
I\'m using the jquery each function that calls this specific function for IE:

3条回答
  •  醉酒成梦
    2021-01-21 03:04

    Using the file https://github.com/douglascrockford/JSON-js/blob/master/json2.js you'll have this error: "parsing string: Line: 191 Error: Object doesn't support this property or method". the property or method is valueOf().

    I use the solution suggested in JSON2 Error / Conflict with another script

    return ((typeof this.valueOf === 'function') ? this.valueOf(): this.toString());
    instead of
    return this.valueOf();

提交回复
热议问题