extjs decode response text of connection’s callback

we offen use a connection to lauch a request and get a response. the response text is a json string. how to decode it?

var conn = Ext.create(‘Ext.data.Connection’);
url : ‘addWare.action’,
callback : function(options, success, response) {
var responseArray = Ext.JSON.decode(response.responseText);
Ext.Msg.alert(“错误”, responseArray.msg);


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s