1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.util.JSON-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.util.JSON-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.util.JSON-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="bookmark" href="../docs/?class=Ext.util.JSON"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8 <h1>Class Ext.util.JSON</h1>
9 <table cellspacing="0">
10 <tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
11 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/JSON.js" target="_blank">JSON.js</a></td></tr>
12 <tr><td class="label">Class:</td><td class="hd-info">JSON</td></tr>
13 <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
15 <div class="description">
17 Modified version of Douglas Crockford"s json.js that doesn"t
18 mess with the Object prototype
19 http://www.json.org/js.html<br><br><i>This class is a singleton and cannot be created directly.</i> </div>
21 <div class="hr"></div>
22 <a id="Ext.util.JSON-props"></a>
23 <h2>Public Properties</h2>
24 <div class="no-members">This class has no public properties.</div> <a id="Ext.util.JSON-methods"></a>
25 <h2>Public Methods</h2>
26 <table cellspacing="0" class="member-table">
28 <th class="sig-header" colspan="2">Method</th>
29 <th class="msource-header">Defined By</th>
31 <tr class="method-row expandable">
\r
32 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
34 <a id="Ext.util.JSON-decode"></a>
\r
35 <b>decode</b>( <code>String json</code> ) : Object <div class="mdesc">
\r
36 <div class="short">Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError.</div>
\r
38 Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError. <div class="mdetail-params">
\r
39 <strong>Parameters:</strong>
\r
40 <ul><li><code>json</code> : String<div class="sub-desc">The JSON string</div></li> </ul>
\r
41 <strong>Returns:</strong>
\r
43 <li><code>Object</code><div class="sub-desc">The resulting object</div></li>
\r
49 <td class="msource">JSON</td>
\r
51 <tr class="method-row alt expandable">
\r
52 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
54 <a id="Ext.util.JSON-encode"></a>
\r
55 <b>encode</b>( <code>Mixed o</code> ) : String <div class="mdesc">
\r
56 <div class="short">Encodes an Object, Array or other value</div>
\r
58 Encodes an Object, Array or other value <div class="mdetail-params">
\r
59 <strong>Parameters:</strong>
\r
60 <ul><li><code>o</code> : Mixed<div class="sub-desc">The variable to encode</div></li> </ul>
\r
61 <strong>Returns:</strong>
\r
63 <li><code>String</code><div class="sub-desc">The JSON string</div></li>
\r
69 <td class="msource">JSON</td>
\r
72 <a id="Ext.util.JSON-events"></a>
73 <h2>Public Events</h2>
74 <div class="no-members">This class has no public events.</div>