You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Dukaczewski <m....@tu-bs.de> on 2010/09/13 16:28:09 UTC

[T5] Key order in JSONObject

Hi!

I have a problem with the JSONObject in Tapestry. I would like to use a
Javascript Prototype component which expects a JSON object. The
component outputs the data in the order they were transmitted in the
JSON object. The problem is that in the implementation of the JSONObject
in Tapestry a map is used and therefore the order is lost. Here, an
OrderedMap would be the better choose. Should I open a JIRA on this?

Regards,
Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Key order in JSONObject

Posted by Andreas Andreou <an...@di.uoa.gr>.
I'd open an issue at that prototype component instead - a json object is
an unordered collection of key/value pairs. If order is important, they should
be using arrays. AFAIK, at least in Chrome and Opera the iteration order
is not guaranted to be the same as the insertion order.


On Mon, Sep 13, 2010 at 17:28, Michael Dukaczewski
<m....@tu-bs.de> wrote:
> Hi!
>
> I have a problem with the JSONObject in Tapestry. I would like to use a
> Javascript Prototype component which expects a JSON object. The
> component outputs the data in the order they were transmitted in the
> JSON object. The problem is that in the implementation of the JSONObject
> in Tapestry a map is used and therefore the order is lost. Here, an
> OrderedMap would be the better choose. Should I open a JIRA on this?
>
> Regards,
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org