Added support for Firefox 3.1 beta 3's native JSON.
--- a/includes/clientside/static/json.js Fri Mar 20 09:14:03 2009 -0400
+++ b/includes/clientside/static/json.js Fri Mar 20 09:15:00 2009 -0400
@@ -11,6 +11,10 @@
function toJSONString(input)
{
+ if ( window.JSON )
+ {
+ return window.JSON.stringify(input);
+ }
var m = {
'\b': '\\b',
'\t': '\\t',
@@ -142,6 +146,11 @@
function parseJSON(string, filter)
{
+ if ( window.JSON )
+ {
+ return window.JSON.parse(string);
+ }
+
try {
if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.
test(string))