Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.data.writer.Json.js
1 Ext.data.JsonP.Ext_data_writer_Json({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9       {
10         "type": "Boolean",
11         "deprecated": null,
12         "alias": null,
13         "protected": false,
14         "tagname": "cfg",
15         "href": "Json2.html#Ext-data-writer-Json-cfg-allowSingle",
16         "shortDoc": "False to ensure that records are always wrapped in an array, even if there is only\none record being sent. ...",
17         "static": false,
18         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Json.js",
19         "private": false,
20         "name": "allowSingle",
21         "owner": "Ext.data.writer.Json",
22         "doc": "<p>False to ensure that records are always wrapped in an array, even if there is only\none record being sent. When there is more than one record, they will always be encoded into an array.\nDefaults to <tt>true</tt>. Example:</p>\n\n<pre><code>// with allowSingle: true\n\"root\": {\n    \"first\": \"Mark\",\n    \"last\": \"Corrigan\"\n}\n\n// with allowSingle: false\n\"root\": [{\n    \"first\": \"Mark\",\n    \"last\": \"Corrigan\"\n}]\n</code></pre>\n\n",
23         "linenr": 33,
24         "html_filename": "Json2.html"
25       },
26       {
27         "type": "Boolean",
28         "deprecated": null,
29         "alias": null,
30         "protected": false,
31         "tagname": "cfg",
32         "href": "Json2.html#Ext-data-writer-Json-cfg-encode",
33         "shortDoc": "True to use Ext.encode() on the data before sending. ...",
34         "static": false,
35         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Json.js",
36         "private": false,
37         "name": "encode",
38         "owner": "Ext.data.writer.Json",
39         "doc": "<p>True to use Ext.encode() on the data before sending. Defaults to <tt>false</tt>.\nThe encode option should only be set to true when a <a href=\"#/api/Ext.data.writer.Json-cfg-root\" rel=\"Ext.data.writer.Json-cfg-root\" class=\"docClass\">root</a> is defined, because the values will be\nsent as part of the request parameters as opposed to a raw post. The root will be the name of the parameter\nsent to the server.</p>\n",
40         "linenr": 25,
41         "html_filename": "Json2.html"
42       },
43       {
44         "type": "String",
45         "deprecated": null,
46         "alias": null,
47         "protected": false,
48         "tagname": "cfg",
49         "href": "Writer.html#Ext-data-writer-Writer-cfg-nameProperty",
50         "shortDoc": "This property is used to read the key for each value that will be sent to the server. ...",
51         "static": false,
52         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
53         "private": false,
54         "name": "nameProperty",
55         "owner": "Ext.data.writer.Writer",
56         "doc": "<p>This property is used to read the key for each value that will be sent to the server.\nFor example:</p>\n\n<pre><code>Ext.define('Person', {\n    extend: 'Ext.data.Model',\n    fields: [{\n        name: 'first',\n        mapping: 'firstName'\n    }, {\n        name: 'last',\n        mapping: 'lastName'\n    }, {\n        name: 'age'\n    }]\n});\nnew Ext.data.writer.Writer({\n    writeAllFields: true,\n    nameProperty: 'mapping'\n});\n\n// This will be sent to the server\n{\n    firstName: 'first name value',\n    lastName: 'last name value',\n    age: 1\n}\n\n</code></pre>\n\n\n<p>Defaults to <tt>name</tt>. If the value is not present, the field name will always be used.</p>\n",
57         "linenr": 29,
58         "html_filename": "Writer.html"
59       },
60       {
61         "type": "String",
62         "deprecated": null,
63         "alias": null,
64         "protected": false,
65         "tagname": "cfg",
66         "href": "Json2.html#Ext-data-writer-Json-cfg-root",
67         "shortDoc": "The key under which the records in this Writer will be placed. ...",
68         "static": false,
69         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Json.js",
70         "private": false,
71         "name": "root",
72         "owner": "Ext.data.writer.Json",
73         "doc": "<p>The key under which the records in this Writer will be placed. Defaults to <tt>undefined</tt>.\nExample generated request, using root: 'records':</p>\n\n<pre><code>{'records': [{name: 'my record'}, {name: 'another record'}]}\n</code></pre>\n\n",
74         "linenr": 16,
75         "html_filename": "Json2.html"
76       },
77       {
78         "type": "Boolean",
79         "deprecated": null,
80         "alias": null,
81         "protected": false,
82         "tagname": "cfg",
83         "href": "Writer.html#Ext-data-writer-Writer-cfg-writeAllFields",
84         "shortDoc": "True to write all fields from the record to the server. ...",
85         "static": false,
86         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
87         "private": false,
88         "name": "writeAllFields",
89         "owner": "Ext.data.writer.Writer",
90         "doc": "<p>True to write all fields from the record to the server. If set to false it\nwill only send the fields that were modified. Defaults to <tt>true</tt>. Note that any fields that have\n<a href=\"#/api/Ext.data.Field-cfg-persist\" rel=\"Ext.data.Field-cfg-persist\" class=\"docClass\">Ext.data.Field.persist</a> set to false will still be ignored.</p>\n",
91         "linenr": 22,
92         "html_filename": "Writer.html"
93       }
94     ],
95     "method": [
96       {
97         "deprecated": null,
98         "alias": null,
99         "href": "Writer.html#Ext-data-writer-Writer-method-constructor",
100         "tagname": "method",
101         "protected": false,
102         "shortDoc": "Creates new Writer. ...",
103         "static": false,
104         "params": [
105           {
106             "type": "Object",
107             "optional": true,
108             "doc": "<p>(optional) Config object.</p>\n",
109             "name": "config"
110           }
111         ],
112         "private": false,
113         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
114         "doc": "<p>Creates new Writer.</p>\n",
115         "owner": "Ext.data.writer.Writer",
116         "name": "Json",
117         "html_filename": "Writer.html",
118         "return": {
119           "type": "Object",
120           "doc": "\n"
121         },
122         "linenr": 62
123       },
124       {
125         "deprecated": null,
126         "alias": null,
127         "protected": false,
128         "tagname": "method",
129         "href": "Writer.html#Ext-data-writer-Writer-method-getRecordData",
130         "shortDoc": "Formats the data for each record before sending it to the server. ...",
131         "static": false,
132         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
133         "private": false,
134         "params": [
135           {
136             "type": "Object",
137             "optional": false,
138             "doc": "<p>The record that we are writing to the server.</p>\n",
139             "name": "record"
140           }
141         ],
142         "name": "getRecordData",
143         "owner": "Ext.data.writer.Writer",
144         "doc": "<p>Formats the data for each record before sending it to the server. This\nmethod should be overridden to format the data in a way that differs from the default.</p>\n",
145         "linenr": 88,
146         "return": {
147           "type": "Object",
148           "doc": "<p>An object literal of name/value keys to be written to the server.\nBy default this method returns the data property on the record.</p>\n"
149         },
150         "html_filename": "Writer.html"
151       },
152       {
153         "deprecated": null,
154         "alias": null,
155         "protected": false,
156         "tagname": "method",
157         "href": "Writer.html#Ext-data-writer-Writer-method-write",
158         "shortDoc": "Prepares a Proxy's Ext.data.Request object ...",
159         "static": false,
160         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Writer.js",
161         "private": false,
162         "params": [
163           {
164             "type": "Ext.data.Request",
165             "optional": false,
166             "doc": "<p>The request object</p>\n",
167             "name": "request"
168           }
169         ],
170         "name": "write",
171         "owner": "Ext.data.writer.Writer",
172         "doc": "<p>Prepares a Proxy's <a href=\"#/api/Ext.data.Request\" rel=\"Ext.data.Request\" class=\"docClass\">Ext.data.Request</a> object</p>\n",
173         "linenr": 70,
174         "return": {
175           "type": "Ext.data.Request",
176           "doc": "<p>The modified request object</p>\n"
177         },
178         "html_filename": "Writer.html"
179       }
180     ],
181     "property": [
182
183     ],
184     "cssVar": [
185
186     ],
187     "cssMixin": [
188
189     ],
190     "event": [
191
192     ]
193   },
194   "singleton": false,
195   "alias": null,
196   "superclasses": [
197     "Ext.data.writer.Writer"
198   ],
199   "protected": false,
200   "tagname": "class",
201   "mixins": [
202
203   ],
204   "href": "Json2.html#Ext-data-writer-Json",
205   "subclasses": [
206
207   ],
208   "static": false,
209   "author": null,
210   "component": false,
211   "filename": "/mnt/ebs/nightly/git/SDK/platform/src/data/writer/Json.js",
212   "private": false,
213   "alternateClassNames": [
214     "Ext.data.JsonWriter"
215   ],
216   "name": "Ext.data.writer.Json",
217   "doc": "<p>This class is used to write <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Ext.data.Model</a> data to the server in a JSON format.\nThe <a href=\"#/api/Ext.data.writer.Json-cfg-allowSingle\" rel=\"Ext.data.writer.Json-cfg-allowSingle\" class=\"docClass\">allowSingle</a> configuration can be set to false to force the records to always be\nencoded in an array, even if there is only a single record being sent.</p>\n",
218   "mixedInto": [
219
220   ],
221   "linenr": 1,
222   "xtypes": [
223
224   ],
225   "html_filename": "Json2.html",
226   "extends": "Ext.data.writer.Writer"
227 });