git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git]
/
src
/
core
/
src
/
misc
/
JSON.js
diff --git
a/src/core/src/misc/JSON.js
b/src/core/src/misc/JSON.js
index
00d3510
..
c09b703
100644
(file)
--- a/
src/core/src/misc/JSON.js
+++ b/
src/core/src/misc/JSON.js
@@
-14,7
+14,7
@@
If you are unsure which license is appropriate for your use, please contact the
*/
/**
* @class Ext.JSON
*/
/**
* @class Ext.JSON
- * Modified version of Douglas Crockford
"s json.js that doesn"
t
+ * Modified version of Douglas Crockford
's JSON.js that doesn'
t
* mess with the Object prototype
* http://www.json.org/js.html
* @singleton
* mess with the Object prototype
* http://www.json.org/js.html
* @singleton
@@
-107,15
+107,15
@@
Ext.JSON = new(function() {
* <b>The returned value includes enclosing double quotation marks.</b></p>
* <p>The default return format is "yyyy-mm-ddThh:mm:ss".</p>
* <p>To override this:</p><pre><code>
* <b>The returned value includes enclosing double quotation marks.</b></p>
* <p>The default return format is "yyyy-mm-ddThh:mm:ss".</p>
* <p>To override this:</p><pre><code>
-
Ext.JSON.encodeDate = function(d) {
-
return d.format(
'"Y-m-d"');
-
};
+Ext.JSON.encodeDate = function(d) {
+
return Ext.Date.format(d,
'"Y-m-d"');
+};
</code></pre>
* @param {Date} d The Date to encode
* @return {String} The string literal to use in a JSON string.
*/
this.encodeDate = function(o) {
</code></pre>
* @param {Date} d The Date to encode
* @return {String} The string literal to use in a JSON string.
*/
this.encodeDate = function(o) {
- return '"' + o.getFullYear() + "-"
+ return '"' + o.getFullYear() + "-"
+ pad(o.getMonth() + 1) + "-"
+ pad(o.getDate()) + "T"
+ pad(o.getHours()) + ":"
+ pad(o.getMonth() + 1) + "-"
+ pad(o.getDate()) + "T"
+ pad(o.getHours()) + ":"
@@
-125,7
+125,7
@@
Ext.JSON = new(function() {
/**
* Encodes an Object, Array or other value
/**
* Encodes an Object, Array or other value
- * @param {
Mixed
} o The variable to encode
+ * @param {
Object
} o The variable to encode
* @return {String} The JSON string
*/
this.encode = function() {
* @return {String} The JSON string
*/
this.encode = function() {
@@
-171,19
+171,16
@@
Ext.JSON = new(function() {
})();
/**
* Shorthand for {@link Ext.JSON#encode}
})();
/**
* Shorthand for {@link Ext.JSON#encode}
- * @param {Mixed} o The variable to encode
- * @return {String} The JSON string
* @member Ext
* @method encode
* @member Ext
* @method encode
+ * @alias Ext.JSON#encode
*/
Ext.encode = Ext.JSON.encode;
/**
* Shorthand for {@link Ext.JSON#decode}
*/
Ext.encode = Ext.JSON.encode;
/**
* Shorthand for {@link Ext.JSON#decode}
- * @param {String} json The JSON string
- * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid.
- * @return {Object} The resulting object
* @member Ext
* @method decode
* @member Ext
* @method decode
+ * @alias Ext.JSON#decode
*/
Ext.decode = Ext.JSON.decode;
*/
Ext.decode = Ext.JSON.decode;