Jersey JAX-RS and Swagger with Genson

110 views
Skip to first unread message

mdd...@gmail.com

unread,
Jul 5, 2017, 10:40:25 AM7/5/17
to Genson user group
Hi,

does anyone have experience in convincing Swagger to use Genson (already configured for JAX-RS) instead of Jackson? I am am getting serialization errors now as swagger is trying to use Jackson instead of Genson. Any help would be greatly appreciated!

Jersey: 1.19
Genson: 1.4
Swagger: 1.5.0

Thanks in advance,
Michael

Eugen Cepoi

unread,
Jul 5, 2017, 9:47:54 PM7/5/17
to gen...@googlegroups.com
Hi Michael,

I don't think it is possible as swagger is using jackson directly in its code. They don't seem to allow users to plugin in another json ser/de lib.
Seems they have an open issue to support Gson in addition to jackson.

Eugen

--
You received this message because you are subscribed to the Google Groups "Genson user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genson+unsubscribe@googlegroups.com.
To post to this group, send email to gen...@googlegroups.com.
Visit this group at https://groups.google.com/group/genson.
To view this discussion on the web visit https://groups.google.com/d/msgid/genson/c138f638-ae9e-4c7f-aa5c-c75ced1f9947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mdd...@gmail.com

unread,
Jul 24, 2017, 1:45:43 PM7/24/17
to Genson user group
Thanks for the answer (sorry for the late reply). Pity they do not just use the jax-rs mechanism for obtaining the correct json-provider. (Having said that, there seems to be some gson-specific code necessary: https://stackoverflow.com/questions/30219946/springfoxswagger2-does-not-work-with-gsonhttpmessageconverterconfig/30220562#30220562).

There seems to be a pull-request for springfox: https://github.com/coinblesk/coinblesk-shared-resources/pull/4/files :-).

Michael


On Thursday, July 6, 2017 at 3:47:54 AM UTC+2, eugen wrote:
Hi Michael,

I don't think it is possible as swagger is using jackson directly in its code. They don't seem to allow users to plugin in another json ser/de lib.
Seems they have an open issue to support Gson in addition to jackson.

Eugen
2017-07-05 7:40 GMT-07:00 <mdd...@gmail.com>:
Hi,

does anyone have experience in convincing Swagger to use Genson (already configured for JAX-RS) instead of Jackson? I am am getting serialization errors now as swagger is trying to use Jackson instead of Genson. Any help would be greatly appreciated!

Jersey: 1.19
Genson: 1.4
Swagger: 1.5.0

Thanks in advance,
Michael

--
You received this message because you are subscribed to the Google Groups "Genson user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genson+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages