if(!Object.prototype.toJSONString){Array.prototype.toJSONString=function(){var e=["["],c,g,d=this.length,f;function h(a){if(c){e.push(",")}e.push(a);c=true}for(g=0;g<d;g+=1){f=this[g];switch(typeof f){case"object":if(f){if(typeof f.toJSONString==="function"){h(f.toJSONString())}}else{h("null")}break;case"string":case"number":case"boolean":h(f.toJSONString())}}e.push("]");return e.join("")};Boolean.prototype.toJSONString=function(){return String(this)};Date.prototype.toJSONString=function(){function a(b){return b<10?"0"+b:b}return'"'+this.getFullYear()+"-"+a(this.getMonth()+1)+"-"+a(this.getDate())+"T"+a(this.getHours())+":"+a(this.getMinutes())+":"+a(this.getSeconds())+'"'};Number.prototype.toJSONString=function(){return isFinite(this)?String(this):"null"};Object.prototype.toJSONString=function(){var d=["{"],c,f,e;function g(a){if(c){d.push(",")}d.push(f.toJSONString(),":",a);c=true}for(f in this){if(this.hasOwnProperty(f)){e=this[f];switch(typeof e){case"object":if(e){if(typeof e.toJSONString==="function"){g(e.toJSONString())}}else{g("null")}break;case"string":case"number":case"boolean":g(e.toJSONString())}}}d.push("}");return d.join("")};(function(s){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};s.parseJSON=function(filter){var j;function walk(k,v){var i;if(v&&typeof v==="object"){for(i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i])}}}return filter(k,v)}if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)){try{j=eval("("+this+")")}catch(e){JSONSyntaxError(this);return"parseJSON"}}else{JSONSyntaxError(this);return"parseJSON"}if(typeof filter==="function"){j=walk("",j)}return j};s.toJSONString=function(){if(/["\\\x00-\x1f]/.test(this)){return'"'+this.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+this+'"'}})(String.prototype)}function JSONSyntaxError(a){if(typeof(console.log)=="function"){console.error("parseJSON");console.log(a.toString())}};