users@jersey.java.net

Re: [Jersey] List marshall

From: Ricardo Borillo <borillo_at_si.uji.es>
Date: Sun, 19 Sep 2010 23:14:52 +0200

Hi Tatu,

I'm using Jersey 1.1.5.1 and I thought i was using jackson when i have
included jersey-json in my pom.xml ...

Please, can you provide an example of how to load the jackson provider
(as you say, on the source or servlet config)?

Thanks in advance.

---
Regards,
====================================
Ricardo Borillo Domenech
http://xml-utils.com / http://twitter.com/borillo
On Sun, Sep 19, 2010 at 19:02, Tatu Saloranta <tsaloranta_at_gmail.com> wrote:
> On Sun, Sep 19, 2010 at 8:11 AM, Ricardo Borillo
> <Ricardo.Borillo_at_si.uji.es> wrote:
>> Hi Angel,
>>
>> Thanks for your response, but if it's possible i prefer not to user directly
>> JSON classes and work with JAXB ...
>
> As usual, many of problems can be solved by using direct Jackson
> serialization, which does not add extra wrapper around root value.
> Latest versions of Jersey allow this to be done by jersey JSON
> configuration; and with earlier (1.2 and prior maybe?) you just
> explicitly include JacksonJaxRsProvider (one-line in code, or couple
> in servlet configuration).
> This way no configuration is needed, not even @XmlRootElement, in
> classes, nor use of any library-specific types. Just regular POJOs,
> maps, lists or arrays.
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>