users@jersey.java.net

[Jersey] Re: Deserializing JSON using jersey-client

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Wed, 23 Mar 2011 21:37:51 +0100

On 03/23/2011 02:19 PM, Gili wrote:
> Jakub Podlesak-2 wrote:
>> Hi Gili,
>>
>> Could you please double-check, you have the jersey-json
>> added as a dependency and you have set
>> the JSONConfiguration.FEATURE_POJO_MAPPING on the client?
>> The version parameter should not do any harm.
> You're right! I was confusing the server-side and client-side configuration.
>
> Could someone please update the example at
> http://download.java.net/maven/2/com/sun/jersey/samples/jacksonjsonprovider/1.5/jacksonjsonprovider-1.5-project.zip
> to showcase the use of a client-side configuration? The test cases are
> retrieving JSON responses as String instead of exercising the client-side
> jackson provider as I expected.

This is to test the output format. There are some edge cases, where
JAXB->JSON->JAXB roundtrip tests pass, but the JSON format is ugly.
That is why the String provider is utilized in the Jackson provider
example tests.

Anyway, you are right, there are missing tests for the JSON->Java
client side mapping in the example. I am going to add them.
However, as the tests rely on the Jersey test framework,
the example would not depict a complete Jackson based JSON
consuming Jersey client configuration. I recently added
a simple snippet to the Jersey user doc [1] to cover that part.

~Jakub

[1]http://jersey.java.net/nonav/documentation/1.6-SNAPSHOT/json.html#d4e894

> Should I open a bug report for this?
>
> Thanks,
> Gili
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Deserializing-JSON-using-jersey-client-tp6191049p6199811.html
> Sent from the Jersey mailing list archive at Nabble.com.
>