Json Class

Namespace: Ext.data.writer

Base Types

System.Object

Constructors

Name Description
Json(JsonConfig)
Json()

Properties

Name Description
alias
allowSingle @cfg {Boolean} allowSingle 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"
}]
            
alternateClassName @class Ext.data.writer.Json @extends Ext.data.writer.Writer This class is used to write {@link Ext.data.Model} data to the server in a JSON format. The {@link #allowSingle} configuration can be set to false to force the records to always be encoded in an array, even if there is only a single record being sent. @markdown
encode @cfg {Boolean} encode True to use Ext.encode() on the data before sending. Defaults to false. The encode option should only be set to true when a {@link #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.
extend @class Ext.data.writer.Json @extends Ext.data.writer.Writer This class is used to write {@link Ext.data.Model} data to the server in a JSON format. The {@link #allowSingle} configuration can be set to false to force the records to always be encoded in an array, even if there is only a single record being sent. @markdown

Methods

Name Description
writeRecords(object, object)
© Copyright 2005-2011 SharpKit. All rights reserved.