users@jersey.java.net

[Jersey] Re: Unmarshalling of JSON using XmlAdapter with Jersey client

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 19 Jul 2011 11:24:56 -0700

On Tue, Jul 19, 2011 at 8:15 AM, Christian Gerteis
<gerteisc_at_dhbw-loerrach.de> wrote:
> Hello,
>
> I'm having trouble unmarshalling some JSON back into the desired type using
> a XmlAdapter. In particular I'm marshalling a java.util.Map into JSON on the
> server side. So far it works fine. The unmarshalling on the client side
> gives me the following stack trace:

If you are dealing with Java Maps, it would be much easier to work
with "POJO mapping" for JSON -- it "just works"; no adapters, holders.
This because JSON has native map type (JSON Object); whereas
JAXB-based approach has to go through XML model that has no such
metadata available.

-+ Tatu +-