users@jersey.java.net

Re: [Jersey] Jaxb/Json and XmlElementRef

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Wed, 8 Sep 2010 18:12:15 +0200

On Sep 8, 2010, at 5:59 PM, Johannes Schneider wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/02/2010 06:44 PM, Tatu Saloranta wrote:
>> And as usual, the other way is to go "pure Jackson", by registering
>> JacksonJaxrsProvider.
>> That would make JSON look much more natural. Configuration for this
>> is
>> global, affecting only json handling; xml can be produced and
>> consumed
>> using JAXB.
>
> Thanks a lot.
> That has solved everything. I just registered
> JacksonJaxbJsonProvider.class and now JSON seems to work nicely...
>
> So maybe jersey-json should/could be switched to Jackson?
>

We are shipping Jackson 1.5.5 with Jersey 1.4 that ships GF 3.1.

In 1.4 ea releases it is supported out of the box if you enable the
feature "com.sun.jersey.api.json.POJOMappingFeature" so that Jackson
will take precedence over JAXB/JSON.

I need to talk more about this with configuration with Jakub, as i
think a better way to define this is to add another JSON convention
type (POJO) and the developer can configure that the default
convention should be.

Paul.