users@jersey.java.net

Re: [Jersey] JavaOne week <was> Re: [Jersey] JsonGenerationException: Can not write text value, expecting field name

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Tue, 02 Jun 2009 15:05:50 +0200

Tatu Saloranta wrote:
> On Mon, Jun 1, 2009 at 1:21 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
>> Hi Farrukh,
>>
>> As you may it is JavaOne this week, so we may not get around to working out
>> what is wrong... plus Jakub will be away the week after. All i can suggest
>> for the moment is to create a reproducible test case and attach it to an
>> issue.
>>
>> The error is originating from Jackson, but i reckon it may be the way Jersey
>> uses Jackson and the information that is passed to it for certain values.
>>
> ...
>
> Right: what the error message suggests is that JSON context (in
> output) is that of Map, and what is to be output next would be
> fieldname:value combination, but instead caller tries to output a
> value (String value in this case). This is probably some mismatch
> between code that tries to output a JSON array (values separated by
> commas), as opposed to JSON object (name:value pairs).
>
> I don't know how troubleshooting would work, but definitely writing a
> simple (as simple as possible) unit test to reproduce would allow it
> to be fixed.
>

+1

Farrukh, sending out such a test case would be the most helpful,

Thanks,

~Jakub
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>