PDA

View Full Version : the counterpart in v4.* for Ext.util.JSON.decode(result.responseText) in v2.2



mxu
22 Feb 2012, 2:08 PM
hello,

trying to migrate to v4.1 and I have the ajax call in v2.2 like
Ext.Ajax.request ({
url: tURL,
params: {},
method: 'GET',
success: function (result, request) {
jsonData = Ext.util.JSON.decode(result.responseText);
var NoRec = parseInt(jsonData.snpRows.length, 10);
},
failure: function ( result, request) {
Ext.Msg.show({
title: 'Retrieve Analysis Track Error',
msg: ['Ajax call failed at retrieving the analysis <br><b>request status:&nbsp;&nbsp;',result.status, '<br>request error:&nbsp;&nbsp;',result.statusText,'<br><br>Details:<br>',result.responseText].join(''),
minWidth: 420,
buttonText : 'close',
icon: Ext.MessageBox.QUESTION
});
return ;
},
callback: function( result, request ){
var testing = jsonData;
populateGrid(testing);
}

});

but Ext.util.JSON.decode() is no longer working at v4.1, what's the counterpart in Ext JS 4.* for Ext.util.JSON.decode(result.responseText) in v2.2 ?

thanks

mxu

mitchellsimoens
22 Feb 2012, 2:30 PM
Ext.JSON.decode or Ext.decode in Ext JS 4

mxu
22 Feb 2012, 4:39 PM
thanks

mxu