Trac isn't responding at the moment so I can't explore and see what
other problems Hash.toQueryString is having, but I completely rewrote
it myself to support nested structures and the rewrite handles all of
the cases mentioned in this thread correctly (including for servers
out there that aren't running Rails). The string returned reproduces
the original data structure on the server-side flawlessly and is only
26 lines of code total!

For your consideration, I've included the code and a test page that
allows you to run your own tests and includes a good default test case
that also shows off it's abilities nicely. It can be tested alongside
the Prototype 1.5.1_rc1 version which obviously does not encode arrays
correctly and cannot encode the nested structures.

Code: http://pastie.caboo.se/47059
Test: http://colin.mollenhour.com/posttest.php

I'd appreciate your opinions and tests if you think you can break it.

Thanks,
Colin


--~--~---------~--~----~------------~-------~--~----~
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