I have been using the json, dataFormats, and marshall/unmarshall tags in the Camel Spring DSL as described in the following url and snippet from applicationContext.xml.
http://camel.apache.org/json.html
...
<dataFormats>
<json id="json" library="Jackson" unmarshalTypeName="com.example.Foo" />
</dataFormats>
...
<route>
<from uri="direct:inPojo"/>
<marshal ref="json"/>
</route>
<route>
<from uri="direct:backPojo"/>
<unmarshal ref="json"/>
</route>
...
I want to serialize my joda DateTime objects as longs, as mentioned here:
http://wiki.fasterxml.com/JacksonFAQDateHandling
I understand that I need to register the separate Jackson-datatype-Joda module, and how to do that when I have an instance of an ObjectMapper, as mentioned in How to serialize Joda DateTime with Jackson JSON processer?, but is there a way to do it using the Camel/Spring XML tags?