Это довольно легко на самом деле. Когда вы возвращаете данные с сервера, все, что вам нужно сделать, это включить поле метаданных в JSON, которое определяет структуру записи.
См. Эту документацию: http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.data.JsonReader
Пример из документации выглядит следующим образом:
{
metaData: {
"idProperty": "id",
"root": "rows",
"totalProperty": "results"
"successProperty": "success",
"fields": [
{"name": "name"},
{"name": "job", "mapping": "occupation"}
],
// used by store to set its sortInfo
"sortInfo":{
"field": "name",
"direction": "ASC"
},
// paging data (if applicable)
"start": 0,
"limit": 2,
// custom property
"foo": "bar"
},
// Reader's configured successProperty
"success": true,
// Reader's configured totalProperty
"results": 2000,
// Reader's configured root
// (this data simulates 2 results per page)
"rows": [ // *Note: this must be an Array
{ "id": 1, "name": "Bill", "occupation": "Gardener" },
{ "id": 2, "name": "Ben", "occupation": "Horticulturalist" }
]
}