Is there any reason why you can't just make a custom script to output
whatever JSON format you want?  I'm not convinced this has usefulness
outside your use case that would warrant changing the generic format.


On Thu, Apr 7, 2011 at 10:26 AM, Tobias Bocanegra <tri...@adobe.com> wrote:

> thanks felix,
> i think we go the same way here - maybe it was not so clear from my wording
> :-)
> all i'm saying is: sling uses a JSON like format to present a resource
> tree which can cause problems for JSON/ECMA compliant clients that
> don't implement stable child object ordering. as mentioned by [3] this
> is very unfortunate that ECMA script engines don't do that.
> such clients currently can't re-use the existing JSON->Object decoder
> and need to implement it themselves.
>
> > Maybe we could just use a regular "illegal" property name like
> > ":child-node-order" or ":sling:child-node-order" instead of a single
> character
> sling is all about resources - not nodes, right :-) so i'd rather go for:
>
> ":child-resource-names" or a shorter ":child-names"
>
> regards, toby
>
> [3] http://old.nabble.com/iteration-order-for-Object-td31120998.html
>
> On Thu, Apr 7, 2011 at 4:31 AM, Felix Meschberger <fmesc...@adobe.com>
> wrote:
> > Hi,
> >
> > Am Donnerstag, den 07.04.2011, 12:22 +0100 schrieb Alexander
> > Klimetschek:
> >> On 07.04.11 09:17, "Felix Meschberger" <fmesc...@adobe.com> wrote:
> >> >>the special array "*" would contain the names of the child resources
> >> >> in the order provided by the resource resolver.
> >> > Maybe we could just use a regular "illegal" property name like
> >> >":child-node-order" or ":sling:child-node-order" instead of a single
> >> >character.
> >>
> >> What about using ":order"?
> >
> > The problem is that ":order" already is used by the Sling POST Servlet
> > to define the order of newly inserted nodes...
> >
> > While I don't think we are walking into a collision here in the near
> > future, I would like to either not use that name or correlate an
> > potential update of Sling POST Servlet's use of the parameter, e.g. to
> > define/update the order of nodes ....
> >
> >>
> >> And the selector would be "order" as well (e.g.
> "foo.order.infinity.json").
> >
> > sounds reasonable to me.
> >
> > Regards
> > Felix
> >
> >
> >

Reply via email to