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.
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.