Hi, Am Donnerstag, den 07.04.2011, 20:46 +0100 schrieb Eric Norman: > Yes, but if order is important it seems more correct to send an array. And > adding a psuedo 'order' property isn't backward compatible either.
I see, but ... As has been said, the current JSON export has the nice "side-effect" of being an exact view on the Sling Resource Tree (the repository mostly, but not exclusively). I think this is one of the value propositions of our JSON export. So, I would like to keep this. Adding a new property ":order" (remark the leading colon) on request, we can provide the ordering information in a special property which should/cannot be mistaken for a regular property (because the leading colon would be an illegale JCR name). Also, the ":order" would only be sent on-request. So, I think we are backwards compatible and the workaround IMHO is acceptable. Regards Felix > > On Thu, Apr 7, 2011 at 11:26 AM, Tobias Bocanegra <tri...@adobe.com> wrote: > > > On Thu, Apr 7, 2011 at 10:38 AM, Eric Norman <eric.d.nor...@gmail.com> > > wrote: > > > why not just render the ordered child nodes as a json array? > > > > that's another way, yes. but then you need to transport the resource > > name in a special property. eg: > > > > { > > name: "foo", > > properties: { > > .... > > }, > > children: [ > > { > > name:"child1", > > properties: { ... }, > > children : [ ...] > > }, > > { > > ... > > } > > ] > > > > but this would not be backward compatible and is more complex, too. > > regards, toby