Some code that I don't have control over is overriding the global JSON object without checking if it's already implemented:
var JSON = {
org: "http://www.JSON.org",
copyright: "(c)2005 JSON.org",
license: "http://www.crockford.com/JSON/license.html",
stringify: function(a, g) {
...
The problem is that this version of the JSON parser is very old and has a bug, which is fouling up my attempts at serialization. (Others have had a similar problem with this implementation.)
Can I get at the browser's native implementation? I thought delete would work, but it doesn't. I suspect that's because JSON is an object and not a method in the prototype. Is there some other way to get at it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…