users@jersey.java.net

[Jersey] Re: Migrating from 1.17 to 2.x

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Tue, 11 Mar 2014 10:17:03 +0100

Hi Michal,

Please see inline…

On 06 Mar 2014, at 14:08, michal sankot <michalsankot_at_appnostic.com> wrote:

> Hi guys,
> I have a project with Jersey 1.17. It runs on Google App Engine and we use it for consuming and producing XML and JSON over GET/POST. Project is built with Gradle.
>
> I'm thinking about migrating it to Jersey 2.x. I have two questions:
>
> 1) Are those features that I use in 1.17 available in 2.x ?

Yes, producing/consuming JSON/XML over GET/POST is supported.

> 2) Which dependencies to use in 2.x ?

It depends on you current 1.17 config. POJOMappingFeature uses Jacskon JSON providers.
Please see https://jersey.java.net/documentation/latest/media.html#json.jackson on how to use them in Jersey 2.

HTH,

~Jakub

> There is a doc about migrating (https://jersey.java.net/documentation/latest/migration.html) but it doesn't address this issue of dependency migration. Furthermore how do properties from web.xml change ? (like com.sun.jersey.api.json.POJOMappingFeature etc.)
>
> Cheers,
> Michal