PDA

View Full Version : [FIXED][3.0] JSON usage in JsonReader and TreeLoader



stever
7 Apr 2009, 2:12 PM
I think JsonReader.read ought to use the Ext JSON functionality rather than calling eval.

Original:


read : function(response){
var json = response.responseText;
var o = eval("("+json+")");
if(!o) {
throw {message: "JsonReader.read: Json object not found"};
}
return this.readRecords(o);
}

Proposed:

read : function(response){
var o = Ext.decode(response.responseText);
if(!o) {
throw {message: "JsonReader.read: Json object not found"};
}
return this.readRecords(o);


Same thing in TreeLoader.processResponse.

evant
7 Apr 2009, 3:40 PM
Fixed in SVN.