How I'll create a model from json file? (ExtJS)
问题 This the model that I want to create using json file Ext.define('Users', { extend: 'Ext.data.Model', fields: [{name: 'user_id', type: 'int'}, {name: 'user_name', type: 'string'}] }); What do I have to do in order to automatically create this model, based on the content of a json response from the server? 回答1: In order to have the model created automatically, you need to include the metaData field with your Json data. metaData can be used to describe all of the fields for the Model. In the