lib/har/viewer/scripts/jquery-plugins/jquery.json.js in har-0.0.9 vs lib/har/viewer/scripts/jquery-plugins/jquery.json.js in har-0.1.0
- old
+ new
@@ -1,6 +2 @@
-(function(r){if(!l)var l={};(function(){function i(a){return a<10?"0"+a:a}function h(a){p.lastIndex=0;return p.test(a)?'"'+a.replace(p,function(c){var d=s[c];return typeof d==="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function j(a,c){var d,f,m=g,e,b=c[a];if(b&&typeof b==="object"&&typeof b.toJSON==="function")b=b.toJSON(a);if(typeof n==="function")b=n.call(c,a,b);switch(typeof b){case "string":return h(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);
-case "object":if(!b)return"null";g+=o;e=[];if(Object.prototype.toString.apply(b)==="[object Array]"){f=b.length;for(a=0;a<f;a+=1)e[a]=j(a,b)||"null";c=e.length===0?"[]":g?"[\n"+g+e.join(",\n"+g)+"\n"+m+"]":"["+e.join(",")+"]";g=m;return c}if(n&&typeof n==="object"){f=n.length;for(a=0;a<f;a+=1){d=n[a];if(typeof d==="string")if(c=j(d,b))e.push(h(d)+(g?": ":":")+c)}}else for(d in b)if(Object.hasOwnProperty.call(b,d))if(c=j(d,b))e.push(h(d)+(g?": ":":")+c);c=e.length===0?"{}":g?"{\n"+g+e.join(",\n"+g)+
-"\n"+m+"}":"{"+e.join(",")+"}";g=m;return c}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,o,s={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;if(typeof l.stringify!=="function")l.stringify=function(a,c,d){var f;o=g="";if(typeof d==="number")for(f=0;f<d;f+=1)o+=" ";else if(typeof d==="string")o=d;if((n=c)&&typeof c!=="function"&&(typeof c!=="object"||typeof c.length!=="number"))throw new Error("JSON.stringify");return j("",
-{"":a})};if(typeof l.parse!=="function")l.parse=function(a,c){function d(f,m){var e,b,k=f[m];if(k&&typeof k==="object")for(e in k)if(Object.hasOwnProperty.call(k,e)){b=d(k,e);if(b!==undefined)k[e]=b;else delete k[e]}return c.call(f,m,k)}q.lastIndex=0;if(q.test(a))a=a.replace(q,function(f){return"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)});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,""))){a=eval("("+a+")");return typeof c==="function"?d({"":a},""):a}throw new SyntaxError("JSON.parse");}})();r.toJSON=function(i,h){if(typeof h=="undefined")h=null;return l.parse(i,h)};r.jSONToString=function(i,h,j){if(typeof h=="undefined")h=null;if(typeof j=="undefined")j=null;return l.stringify(i,h,j)}})(jQuery);
+(function($){if(!JSON)var JSON={};(function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i==="object"&&typeof i.toJSON==="function"&&(i=i.toJSON(a)),typeof rep==="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep==="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d==="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}typeof Date.prototype.toJSON!=="function"&&(Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!=="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c==="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c==="string"&&(indent=c);rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!=="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e==="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})})(),$.toJSON=function(a,b){typeof b=="undefined"&&(b=null);return JSON.parse(a,b)},$.jSONToString=function(a,b,c){typeof b=="undefined"&&(b=null),typeof c=="undefined"&&(c=null);return JSON.stringify(a,b,c)}})(jQuery)
\ No newline at end of file