cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julio Carlos Barrera Juez <juliocarlos.barr...@i2cat.net>
Subject Re: Using Jackson as JSON body reader/writer with DOSGi
Date Fri, 14 Jun 2013 13:19:58 GMT
Thank you very much, I will try it on Monday ;-) Have a nice weekend!


On 14 June 2013 15:17, NCorbet <Neil.Corbet@gmail.com> wrote:

> Julio,
>
> Here is configuration I added to my spring file to use
> JacksonJaxbJsonProvider:
>
> <bean id="jaxbAnnotationInspector"
> class="org.codehaus.jackson.xc.JaxbAnnotationIntrospector" />
> <bean id="jacksonObjectMapper"
> class="org.codehaus.jackson.map.ObjectMapper">
>                 <property name="annotationIntrospector"
> ref="jaxbAnnotationInspector" />
> </bean>
>
> <bean id="jsonProvider"
> class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" />
>
> You need to set the jaxbAnnotationIntrospector in the ObjectMapper so it
> forces Jackson to look at JaxB annotations first. This worked well for
> me...until I needed to Marshall/UnMarshall abstract types. If you are ok
> with mixing Jackson and Jaxb annotations then this should be no big deal to
> you ( the abstract type issue that is, the rest worked fine).
>
> Hope that helps
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Using-Jackson-as-JSON-body-reader-writer-with-DOSGi-tp5729257p5729278.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message