(function(a){m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},a.toJSON=function(e,g){var f,b,c,d,h=/["\\\x00-\x1f\x7f-\x9f]/g,j;switch(typeof e){case"string":return h.test(e)?'"'+e.replace(h,function(i){var k=m[i];if(k){return k}k=i.charCodeAt();return"\\u00"+Math.floor(k/16).toString(16)+(k%16).toString(16)})+'"':'"'+e+'"';case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e){return"null"}if(typeof e.toJSON==="function"){return e.toJSON()}f=[];if(typeof e.length==="number"&&!(e.propertyIsEnumerable("length"))){d=e.length;for(b=0;b<d;b+=1){f.push(a.toJSON(e[b],g)||"null")}return"["+f.join(",")+"]"}if(g){d=g.length;for(b=0;b<d;b+=1){c=g[b];if(typeof c==="string"){j=a.toJSON(e[c],g);if(j){f.push(a.toJSON(c)+":"+j)}}}}else{for(c in e){if(typeof c==="string"){j=a.toJSON(e[c],g);if(j){f.push(a.toJSON(c)+":"+j)}}}}return"{"+f.join(",")+"}"}}})(jQuery);