users@jersey.java.net

[Jersey] Re: Programmatically configure Jackson POJO mapping?

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Wed, 20 Feb 2013 10:10:13 -0800

On Wed, Feb 20, 2013 at 8:38 AM, Noah White <emailnbw_at_gmail.com> wrote:
> All the examples I have seen configure Jackson POJO mapping (non-JAXB) using the web.xml.
>
> Is there a way to do this programmatically?

Yes, ObjectMapper is registered using standard JAX-RS provider mechanism.
Same for Jackson JAX-RS provider. So web.xml is just one way.

And in fact, Jackson 2.0 JAX-RS provider auto-registers, if added in classpath.

-+ Tatu +-