亲爱的,我收到了类似的错误
Cannot find JSON.stringify()
一些浏览器(例如,IE < 8)本身不支持它,但您可以通过添加对 json2.js 的脚本引用来克服这个问题,可从http://www.json.org/json2.js下载
/// 脚本
stringifyJson: function (data, replacer, space) { // replacer and space are optional
if ((typeof JSON == "undefined") || (typeof JSON.stringify == "undefined"))
throw new Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
return JSON.stringify(ko.utils.unwrapObservable(data), replacer, space);
},
如何引用json2.js
我的 asp.net 项目?