View Full Version : JsonReader issue

13 Mar 2011, 7:31 AM
This is the response from the server.

{success:true, eventdata:{Id:'924',ResourceId:'2109462',Title:'CA',StartDate:'2010-12-04 07:45:00',EndDate:'2010-12-04 11:00:00',color:'#ccffff'}}

Then I use:

1. var res = reader.readResponse(action, response);
2. this.fireEvent("write", this, action, res.data, res, rs, options);
3. callback.call(scope, res.data, res, true);

I have the problem with the first line of code (readResponse). Do you know what the problem with my response data from server?

13 Mar 2011, 8:00 AM
I got the exception : root undefined response
When I define the JsonStore, I already declare root: eventdata.

13 Mar 2011, 10:19 AM
don't forget it's a string:

root: 'eventdata'