users@jersey.java.net

Re: [Jersey] Jackson JAX-RS json provider v 0.9.9-6 (read: 1.0 RC) released

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Wed, 29 Apr 2009 10:50:26 -0700

On Wed, Apr 29, 2009 at 12:49 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> On Apr 28, 2009, at 6:21 PM, Tatu Saloranta wrote:
...
> If we integrate the direct Jackson/JAX-RS/JSON into jersey-json we would
> need some option to disable/enable one or the other. But it could be really
> tricky if an application wants to support both.

Right.

> The only solution i can think of is:
>
> define a Jackson/JSON POJO annotation for use with JAXB, if
> annotated with that then the Jersey JAXB readers/writers
> will not be utilized for the type. Or say the inverse: an annotation to
> state that JAXB should not be used for anything but
> XML.

Another related question is wheter jackson-jaxrs jar should even have
the META-INF/services entries. While convenient (saving one or two
lines of code or config), I don't know if there's a way to disable it.

I could also build 2 separate jars (difference being whether there is
the service manifest or not), but that seems ugly wrt dependencies
(maven).

I should look into jersey-json module to learn bit more about
configuring other providers, maybe that could give some insight.

-+ Tatu +-