users@jersey.java.net

Re: [Jersey] RE: delimiter for QueryParam using List<T>

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Wed, 17 Jun 2009 14:16:52 -0400

The convention I have seen / liked / used for lists in query parameter
value are using "," or ";" as delimeter.
I believe that ',' has been used when there is implied order (List) and
';' when there is no order implied (Set).


Tatu Saloranta wrote:
> On Wed, Jun 17, 2009 at 8:01 AM, Paul Sandoz<Paul.Sandoz_at_sun.com> wrote:
>
>> On Jun 17, 2009, at 3:21 PM, Turner, George wrote:
>>
>>
> ...
>
>>> I was expecting a pipe "|" or
>>> something but not this answer. Is there a W3C reference to this style?
>>>
>> No, AFAIK there is no standard for the syntax of a query parameter value
>> that represents a list of stuff. It is really up to the *application* to
>> define the syntax of those parameter valuess, and what if any the
>> relationship is to multiple parameters with the name parameter name.
>>
>
> Agreed, although I think it is also something that libraries and
> frameworks often define as a convention, and developers may think that
> convention is based on a standard.
> Another example seems to be "matrix path parameters", quite exotic
> construct which I assume it is also some kind of de facto convention?
> (or does JAX-RS define such mangling?)
>
> So to me handling to allow lists of values seems sensible and
> intuitive approach, when expecting multiple values.
> Behavior when binding to a single String is something that could be up
> to discussion tho; for that it would seem best to just use one of
> values.
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>


-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com