Andrew Dupont wrote:
>  We *are* trying to implement a serialization
> method compatible with application/x-www-form-urlencoded

I think this makes the situation very simple then. We need Hash.toQueryString to
behave *exactly* like a form of type application/x-www-form-urlencoded. Forms
*do not* add brackets to inputs so neither should this method. If your backend
requires brackets, then you need to add them to your form input names as well as
your hash key names. It would be strange if you had to do one and not the other.
I think it would be even worse to force users of non-bracketed backends (J2EE,
.Net, Perl, Python, etc) to have to change their backend code to remove the
brackets just because the client side JS library thinks they should be there.

I also think this method is becoming way more complicated than it needs to be.
This is not a generic data serialization method. We don't need to deal with
nested hashes or arrays inside arrays. If you want to serialize arbitrary
structures of arbitrary depths use JSON. It's really good at that.

--
Michael Peters
Developer
Plus Three, LP

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to