Feb 5th, 2013, 10:55 AM
Manually configure the JSON serialization Mapper for a REST service
We have a web service delivering JSON and want to include now a library which depends on fasterXml's Jackson. But we want to use codehouse's Jackson as we did before as there is a difference how the JodaTime objects are serialized and we know that the clients are using an older spring version with the same Jackson.
How to I tell spring, in our context xml file, to use the codehouse ObjectMapper for Json Serialization?
Thanks and Regards
Mar 12th, 2013, 01:53 AM
I managed it with this configuration (in the correct context file...):
<bean id="jacksonObjectMapper" class="org.codehaus.jackson.map.ObjectMapper" />
<property name="objectMapper" ref="jacksonObjectMapper" />
Tags for this Thread