-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Colin Mollenhour wrote:
> WTF!?!?!? This is the fifth time I have posted a reply to a thread via
> google groups and it says the post was successful and then it never
> shows up!!
Sorry, web toys have this nasty habit of eating bytes :(
Anyway, desktop apps have it too, especially when using bleeding edge
"releases", they always crash right in the moment when you really do NOT
want them to crash :))

> Look, I installed and tested this on Rails (using
> CGIMethods.parse_query_parameters) just for this thread and it NEEDS
> brackets, ok?
Sorry x2, proving that this occult bracket convention was inherited by the
Web2.0 kings doesn't prove anything more than the fact that Rails folks
inherited it from Web1.0 kings (PHP) :))

(Which was already mentioned by Mislav, so you really wasted your time for
this - sorry x3) ;-)

> If you think you're right, run a test and prove it.

Try this "echo" service:
        
request:
http://www.neohub.com/ws/echo?foo=1;foo=2;foo=3;bar=4

answer:
{'bar':4,'foo':[1,2,3]}

> I'd like to see tests on other platforms as well to see how brackets and
> numeric indexes are handled (PHP as arrays, Rails as hashes) but I'll
> leave that up to people on those platforms who give a damn (probably
> nobody).

Hehe, now you reminded me that I wasted some time today too reading all the
crap^Wstuff at http://www.php.net/manual/en/language.variables.external.php
trying to understand how does your PHP bracket convention really work.
Look quite clear that if you want arrays, you have to apply some magic to
HTML "name" attributes (adding "[]").

So, if you are using this funky serialization engine for serializing your
magic HTML forms (as Prototype currently tries to do), I'd say yes, it
should do exactly what you expect.
OTOH, as I said in my previous message, folks here seem to be trying making
up some abstract serialization engine, so this discussion is bogus, as you
don't want a perfect Form.serialize(), but just to apply some PHPism into
this application/x-www-form-urlencoded serialization engine. Why don't you
keep on using the same convention you already use in your HTML with this
toy? It should work the same. For instance:

>>> $H({'foo[]':[1,2,3]}).toQueryString()
"foo%5B%5D=1&foo%5B%5D=2&foo%5B%5D=3"

Isn't it what you want?

- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----

iD8DBQFF+c3ntZHp/AYZiNkRAuZWAJ9m5wHxfVbGBiAo3xQ9AOZIsqO1nwCgu95z
/m71y5jtI2XYb8Xs16gpi7E=
=JHTD
-----END PGP SIGNATURE-----

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