Skip to content

Commit 5c12f38

Browse files
committed
Bumping version number to 2.3
* Building new .min.js file * Making this version available as download for 2.3 * Actually setting it to 2.3-"beta" in svn in preparation the next potential commit. Link to the download if you need stability
1 parent 57ca7e8 commit 5c12f38

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/jquery.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jQuery JSON Plugin
3-
* version: 2.2 (2011-09-16)
3+
* version: 2.3 (2011-09-17)
44
*
55
* This document is licensed as free software under the terms of the
66
* MIT License: http://www.opensource.org/licenses/mit-license.php

src/jquery.json.min.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

2-
(function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=function(o){if(typeof JSON==='object'&&JSON.stringify){return JSON.stringify(o);}
3-
var type=typeof o;if(o===null){return'null';}
4-
if(type==='undefined'){return undefined;}
2+
(function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
3+
var type=typeof o;if(type==='undefined'){return undefined;}
54
if(type==='number'||type==='boolean'){return''+o;}
65
if(type==='string'){return $.quoteString(o);}
76
if(type==='object'){if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON());}
@@ -19,8 +18,6 @@ return'['+ret.join(',')+']';}
1918
var name,val,pairs=[];for(var k in o){type=typeof k;if(type==='number'){name='"'+k+'"';}else if(type==='string'){name=$.quoteString(k);}else{continue;}
2019
type=typeof o[k];if(type==='function'||type==='undefined'){continue;}
2120
val=$.toJSON(o[k]);pairs.push(name+':'+val);}
22-
return'{'+pairs.join(',')+'}';}};$.evalJSON=function(src){if(typeof JSON==='object'&&JSON.parse){return JSON.parse(src);}
23-
return eval('('+src+')');};$.secureEvalJSON=function(src){if(typeof JSON==='object'&&JSON.parse){return JSON.parse(src);}
24-
var filtered=src.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+src+')');}else{throw new SyntaxError('Error parsing JSON, source is not valid.');}};$.quoteString=function(string){if(string.match(escapeable)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
21+
return'{'+pairs.join(',')+'}';}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){return eval('('+src+')');};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){var filtered=src.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+src+')');}else{throw new SyntaxError('Error parsing JSON, source is not valid.');}};$.quoteString=function(string){if(string.match(escapeable)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
2522
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
2623
return'"'+string+'"';};})(jQuery);

0 commit comments

Comments
 (0)