users@jersey.java.net

[Jersey] Re: returning basic data types

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 15 Mar 2011 10:31:26 -0700

On Tue, Mar 15, 2011 at 12:24 AM, Markus Karg <karg_at_quipsy.de> wrote:
> There is no default mapping of basic data types to any particular body
> format, so you'll either can return a String instead, or you can provide a
> custom MessageBodyWriter which tells JAX-RS how the body format shall look
> like.

When using JSON POJO mapping with Jackson, it should be possible to
just return primitives or wrappers, I think.
Jackson itself can do it, the only possible limitation is whether
JAX-RS plug-in does it.

-+ Tatu +-