users@jersey.java.net

Re: [Jersey] Proper way to read/write customized java types?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 18 Feb 2009 15:00:28 +0100

Hi Will,

Currently the only way we support POJOs to JSON and back is in
conjunction with JAXB.

See Jakub's blog entry:

   http://blogs.sun.com/japod/entry/configuring_json_for_restful_web

See the sample here:

   http://download.java.net/maven/2/com/sun/jersey/samples/json-from-jaxb/1.0.2/json-from-jaxb-1.0.2-project.zip

Note that for the JAXB "natural" convention to work you need to use
JAXB 2.1.10.

Paul.

On Feb 18, 2009, at 2:43 PM, Will Hoover wrote:

> What is the "proper" way to convert POJOs to JSON and back (1.0.2)?
> I seen
> that TODO for "Supporting the Reading and Writing of Customized Java
> Types"
> (http://wikis.sun.com/display/Jersey/Advanced+JAX-RS+1.0+Features) and
> http://blog.refinn.com/category/jersey/ regarding the use of
> jackson. Is
> there an example of how to use this in Jersey?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>