Using Jackson as Jersey client serializer

后端 未结 6 1955
暖寄归人
暖寄归人 2021-01-30 13:23

Is it possible to use Jackson as the serializer/marshaller for JSON data instead of JAXB when using Jersey Client API?

If so how to configure it?

6条回答
  •  终归单人心
    2021-01-30 13:49

    You may skip the creation of external config and register the provider directly:

    Client client = ClientBuilder.newClient().register(JacksonJsonProvider.class)
    

提交回复
热议问题