3 * @class Ext.data.JsonStore
4 * @extends Ext.data.Store
7 * <p>Small helper class to make creating {@link Ext.data.Store}s from JSON data easier.
8 * A JsonStore will be automatically configured with a {@link Ext.data.reader.Json}.</p>
10 * <p>A store configuration would be something like:</p>
13 var store = new Ext.data.JsonStore({
20 url: 'get-images.php',
28 //alternatively, a {@link Ext.data.Model} name can be given (see {@link Ext.data.Store} for an example)
29 fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
33 * <p>This store is configured to consume a returned object of the form:<pre><code>
36 {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
37 {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
42 * <p>An object literal of this form could also be used as the {@link #data} config option.</p>
45 * @param {Object} config
48 Ext.define('Ext.data.JsonStore', {
49 extend: 'Ext.data.Store',
53 * @cfg {Ext.data.DataReader} reader @hide
55 constructor: function(config) {
56 config = config || {};
66 this.callParent([config]);