On 30 Sep 2008, at 11:23, Thomas Lee wrote:
>
> The semantic changes are as follows:
>
> INPUT: "a[][x]=5&a[][y]=10"
> OLD PARSER OUTPUT: {"a" => [{"x" => "5", "y" => "10"}]}
> NEW PARSER OUTPUT: {"a" => [{"x" => "5"}, {"y" => "10"}]}
>
> INPUT: "a[0][x]=5&a[0][y]=10"
> OLD PARSER OUTPUT: {"a" => {"0" => {"x" => "5", "y" => "10"}}}
> NEW PARSER OUTPUT: {"a" => [{"x" => "5"}, {"y" => "10"}]}
>
> INPUT: "a[0][x]=5&a[1][y]=10"
> OLD PARSER OUTPUT: {"a" => {"0" => {"x" => "5"}, "1" => {"y" =>
> "10"}}}
> NEW PARSER OUTPUT: {"a" => [{"x" => "5"}, {"y" => "10"}]}
>
>
I'm curious as to the motivation behind some of these changes. In
particular the last two - is it not desirable to be able to build up
an array of hashes keyed by some value (whether that value happens to
be an index, an id or something else is a bit immaterial as far as I'm
concerned). ?
Fred
> ------------------------------------------------------------------------
>
> Issues to be resolved:
>
> 1. Should the parser be modified to pass the old tests for invalid
> inputs?
> 2. "a[0]=1&a[999]=2" currently yields a 1000 element array with 998
> nil values. Should we implement a SparseArray class that
> minimizes
> memory usage for such a situation, or force sequential indexes?
>
> -----------------
>
> Would appreciate any feedback and/or recommendations.
>
> Cheers,
> Tom
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---