users@jersey.java.net

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

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 04 May 2009 11:36:18 +0200

On Apr 29, 2009, at 7:50 PM, Tatu Saloranta wrote:

> 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.
>

No, there is currently no way to disable it.

In this respect it may be best for explicit registration, to avoid any
silly head scratching with classpath order.

Paul.

> 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 +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>