Bruno
it uses the jquery method, which, as you will see, uses the same new business ("return ..").
parseJSON: function (a) { if (typeof a !== "string" || !a) return null; if (/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@") .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]") .replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return z.JSON && z.JSON.parse ? z.JSON.parse(a) : (new Function("return " + a))(); else c.error("Invalid JSON: " + a) }
[edit] The regular expression, of course, "works" with any rogue characters embedded in the jr string. json
spooky tho :)
jim tollan
source share