从他们的代码:
// Augment the basic prototypes if they have not already been augmented.// These forms are obsolete. It is recommended that JSON.stringify and// JSON.parse be used instead.if (!Object.prototype.toJSONString) { Object.prototype.toJSonString = function (filter) { return JSON.stringify(this, filter); }; Object.prototype.parseJSON = function (filter) { return JSON.parse(this, filter); };}我猜parseJSON已过时,因此新版本(json2)甚至不再使用它。但是,如果您的代码使用
parseJSON很多,则可以将这段代码添加到某个地方以使其再次起作用:
Object.prototype.parseJSON = function (filter) { return JSON.parse(this, filter); };


