> 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]}

Would you care to mention what platform and what method of parsing
into variables is being used in that test? The results are different
than my Rails test.

> Hehe, now you reminded me that I wasted some time today too reading all the
> crap^Wstuff athttp://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 "[]").

That's why I setup my PHP test page for everyone to use...

> 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()

For one, that is hackish and not always possible to do. Also, to
support nesting of arrays you *must* use brackets with indexes so if
you just want reliable serialization and deserialization the brackets
with indexes are the most reliable method. How else can you do this
correctly?
{foo:[[0,1],[2,3]]}

Colin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to