X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.data.writer.Json.html diff --git a/docs/api/Ext.data.writer.Json.html b/docs/api/Ext.data.writer.Json.html new file mode 100644 index 00000000..fc33a620 --- /dev/null +++ b/docs/api/Ext.data.writer.Json.html @@ -0,0 +1,125 @@ +
+Hierarchy
Ext.data.writer.WriterExt.data.writer.Json
False to ensure that records are always wrapped in an array, even if there is only +one record being sent. When there is more than one record, they will always be encoded into an array. +Defaults to true. Example:
+ +// with allowSingle: true
+"root": {
+ "first": "Mark",
+ "last": "Corrigan"
+}
+
+// with allowSingle: false
+"root": [{
+ "first": "Mark",
+ "last": "Corrigan"
+}]
+
+
+True to use Ext.encode() on the data before sending. Defaults to false. +The encode option should only be set to true when a root is defined, because the values will be +sent as part of the request parameters as opposed to a raw post. The root will be the name of the parameter +sent to the server.
+This property is used to read the key for each value that will be sent to the server. +For example:
+ +Ext.define('Person', {
+ extend: 'Ext.data.Model',
+ fields: [{
+ name: 'first',
+ mapping: 'firstName'
+ }, {
+ name: 'last',
+ mapping: 'lastName'
+ }, {
+ name: 'age'
+ }]
+});
+new Ext.data.writer.Writer({
+ writeAllFields: true,
+ nameProperty: 'mapping'
+});
+
+// This will be sent to the server
+{
+ firstName: 'first name value',
+ lastName: 'last name value',
+ age: 1
+}
+
+
+
+
+Defaults to name. If the value is not present, the field name will always be used.
+The key under which the records in this Writer will be placed. Defaults to undefined. +Example generated request, using root: 'records':
+ +{'records': [{name: 'my record'}, {name: 'another record'}]}
+
+
+True to write all fields from the record to the server. If set to false it +will only send the fields that were modified. Defaults to true. Note that any fields that have +Ext.data.Field.persist set to false will still be ignored.
+Formats the data for each record before sending it to the server. This +method should be overridden to format the data in a way that differs from the default.
+The record that we are writing to the server.
+An object literal of name/value keys to be written to the server. +By default this method returns the data property on the record.
+Prepares a Proxy's Ext.data.Request object
+Prepares a Proxy's Ext.data.Request object
+The request object
+The modified request object
+