users@jersey.java.net

JSON providers

From: Tom <808131_at_gmail.com>
Date: Wed, 16 Dec 2009 09:23:01 +0000

Hi,

I'm just starting out with jersey in order to produce JSON but after
replicating a simple example I've become lost. JAXB annotations are
new to me also so I'm currently trying to work out how get the exact
output I need.

The example I've been following is from chapter 1 of the jersey user
guide (with grizzly) but producing application/json.

I've seen that I have various options for generating JSON (Jersey,
Jettison, Jackson, etc.) and there is mention of a JAXBContextResolver
but I don't understand how these fit together, or even if they are the
same thing.

Can someone clarify how to use the JAXBContextResolver example
provided in chapter 3? I don't see how to wire this up since there is
seems to be a certain amount of automated magic in the basic example.
JAXBContextResolver also looks like boiler plate code when it could be
configuration/annotation - is this the only way?

Thanks,

Tom