users@jersey.java.net

Re: [Jersey] RE: Set the root when returning a collection

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Fri, 14 Nov 2008 11:56:57 -0800

Comments inline...

On Fri, Nov 14, 2008 at 09:04:41AM +0100, Paul Sandoz wrote:
> On Nov 14, 2008, at 12:08 AM, Jakub Podlesak wrote:
>>>
>>>
>>>>
>>>> 2) In JSON, there is no "name" for each person object in the array.
>>
>> Do you mean something like:
>>
>> [{"person":{"age":"27",...}}, {"person":{"age":...}}]
>>
>> ?
>>
>> To me it seems a bit redundant, but i agree people should be able
>> to get it (but not by default)
>>
>>>> 3) In JSON, the root is not plural.
>>
>> So that you will end up with:
>>
>> {"people":[{"person":{"age":"27",...}}, {"person":{"age":...}}]}
>>
>> right?
>>
>> I agree, people should be able to configure it.
>>
>
> That is very close to the mapped convention supported by Jettison. I think

Exactly, Jettison mapped convention it is.

> we have a bug in the JSON list writer configuration because it does not
> honor the configuration settings and we don't require any new features to
> support this.

Yes. We should provide configuration options in this case as well.

~Jakub

>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>