Upgrade to ExtJS 3.2.1 - Released 04/27/2010
[extjs.git] / docs / output / Ext.util.JSON.html
index 4baa674..2faa643 100644 (file)
@@ -1,75 +1,15 @@
-        <div class="body-wrap">
-        <div class="top-tools">
-            <a class="inner-link" href="#Ext.util.JSON-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
-            <a class="inner-link" href="#Ext.util.JSON-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
-            <a class="inner-link" href="#Ext.util.JSON-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
-                        <a class="bookmark" href="../docs/?class=Ext.util.JSON"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
-        </div>
-                <h1>Class Ext.util.JSON</h1>
-        <table cellspacing="0">
-            <tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
-            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/JSON.js" target="_blank">JSON.js</a></td></tr>
-            <tr><td class="label">Class:</td><td class="hd-info">JSON</td></tr>
-                                    <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
-                    </table>
-        <div class="description">
-            *
-Modified version of Douglas Crockford"s json.js that doesn"t
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.util.JSON-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.util.JSON-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.util.JSON-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="bookmark" href="../docs/?class=Ext.util.JSON"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><h1>Class <a href="source/JSON.html#cls-Ext.util.JSON">Ext.util.JSON</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/JSON.html#cls-Ext.util.JSON">JSON.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/JSON.html#cls-Ext.util.JSON">JSON</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Modified version of Douglas Crockford"s json.js that doesn"t
 mess with the Object prototype
 mess with the Object prototype
-http://www.json.org/js.html<br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
-        
-        <div class="hr"></div>
-                <a id="Ext.util.JSON-props"></a>
-        <h2>Public Properties</h2>
-        <div class="no-members">This class has no public properties.</div>        <a id="Ext.util.JSON-methods"></a>
-        <h2>Public Methods</h2>
-                <table cellspacing="0" class="member-table">
-            <tr>
-                <th class="sig-header" colspan="2">Method</th>
-                <th class="msource-header">Defined By</th>
-            </tr>
-                <tr class="method-row expandable">\r
-        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
-        <td class="sig">\r
-        <a id="Ext.util.JSON-decode"></a>\r
-            <b>decode</b>(&nbsp;<code>String json</code>&nbsp;) : Object            <div class="mdesc">\r
-                        <div class="short">Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError.</div>\r
-            <div class="long">\r
-                Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError.    <div class="mdetail-params">\r
-        <strong>Parameters:</strong>\r
-        <ul><li><code>json</code> : String<div class="sub-desc">The JSON string</div></li>        </ul>\r
-        <strong>Returns:</strong>\r
-        <ul>\r
-            <li><code>Object</code><div class="sub-desc">The resulting object</div></li>\r
-        </ul>\r
-    </div>\r
-                </div>\r
-                        </div>\r
-        </td>\r
-        <td class="msource">JSON</td>\r
-    </tr>\r
-        <tr class="method-row alt expandable">\r
-        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
-        <td class="sig">\r
-        <a id="Ext.util.JSON-encode"></a>\r
-            <b>encode</b>(&nbsp;<code>Mixed o</code>&nbsp;) : String            <div class="mdesc">\r
-                        <div class="short">Encodes an Object, Array or other value</div>\r
-            <div class="long">\r
-                Encodes an Object, Array or other value    <div class="mdetail-params">\r
-        <strong>Parameters:</strong>\r
-        <ul><li><code>o</code> : Mixed<div class="sub-desc">The variable to encode</div></li>        </ul>\r
-        <strong>Returns:</strong>\r
-        <ul>\r
-            <li><code>String</code><div class="sub-desc">The JSON string</div></li>\r
-        </ul>\r
-    </div>\r
-                </div>\r
-                        </div>\r
-        </td>\r
-        <td class="msource">JSON</td>\r
-    </tr>\r
-            </table>
-                <a id="Ext.util.JSON-events"></a>
-        <h2>Public Events</h2>
-        <div class="no-members">This class has no public events.</div>
-        </div>
\ No newline at end of file
+http://www.json.org/js.html<br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.util.JSON-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.util.JSON-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.JSON-decode"></a><b><a href="source/JSON.html#method-Ext.util.JSON-decode">decode</a></b>(&nbsp;<code>String&nbsp;json</code>&nbsp;)
+    :
+                                        Object<div class="mdesc"><div class="short">Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the sa...</div><div class="long">Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>json</code> : String<div class="sub-desc">The JSON string</div></li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">The resulting object</div></li></ul></div></div></div></td><td class="msource">JSON</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.JSON-encode"></a><b><a href="source/JSON.html#method-Ext.util.JSON-encode">encode</a></b>(&nbsp;<code>Mixed&nbsp;o</code>&nbsp;)
+    :
+                                        String<div class="mdesc"><div class="short">Encodes an Object, Array or other value</div><div class="long">Encodes an Object, Array or other value<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Mixed<div class="sub-desc">The variable to encode</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The JSON string</div></li></ul></div></div></div></td><td class="msource">JSON</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.JSON-encodeDate"></a><b><a href="source/JSON.html#method-Ext.util.JSON-encodeDate">encodeDate</a></b>(&nbsp;<code>Date&nbsp;d</code>&nbsp;)
+    :
+                                        String<div class="mdesc"><div class="short">Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression.
+The ...</div><div class="long"><p>Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression.
+<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.util.JSON.encodeDate = <b>function</b>(d) {
+    <b>return</b> d.format(<em>'<em>"Y-m-d"</em>'</em>);
+};</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>d</code> : Date<div class="sub-desc">The Date to encode</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The string literal to use in a JSON string.</div></li></ul></div></div></div></td><td class="msource">JSON</td></tr></tbody></table><a id="Ext.util.JSON-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>
\ No newline at end of file