View Full Version : [CLOSED][3.0.0] JsonReader with non-array response

17 Jul 2009, 2:40 PM

i struggled a while how to get the data correct in my store, when json response isn't an array but only one object.
After searching i found a slight modification from Condor
JsonReader should be able to process a root that isn't an array, but only a single record object, e.g.
in this thread:

the only change is:

root = [root];

real life example is the user profile from twitter, eg

This would be great if it could be implemented.

btw - i think it's not very handy to have no "hook" for preprocessing the raw data, instead i'm forced to override the complete method, which is overhead.

17 Jul 2009, 7:05 PM
This isn't a bug. It's quite clear in the documentation that the reader expects an array of records to be returned. Marking this as closed.

17 Jul 2009, 10:28 PM
This would however be a very useful feature request (although I think it already exists).

18 Jul 2009, 12:26 AM
Still a few more events needed to be able to poke in functionality at important places...


Preprocessing returned data is a basic requirement.

18 Jul 2009, 1:09 AM
Preprocessing returned data is a basic requirement.

i absolutely sign that! Any chance to get an event after loading raw data?

18 Jul 2009, 2:08 AM
Get in at the HttProxy level: http://extjs.com/forum/showthread.php?p=176802#post176802

18 Jul 2009, 2:19 AM
seems that you fight for those events some longer time now. What is the reason for "ignoring" this?
In TYPO3 "hook-request" is one of the most accepted and quick integrated things - it's what users need.

20 Jul 2009, 1:28 AM
Hi again,

i'm still not pleasured. Argument "Doc state that ..." isn't the right argument imho.
Looking to source i also see something like this in the execute method:

if (this.writer.listful === true && this.restful !== true) {
rs = (Ext.isArray(rs)) ? rs : [rs];
so there is this conversion for writer, i ask why not for the reader?

And the event for raw data is still a valid request.