Spring @ResponseBody Jackson JsonSerializer with JodaTime
Although you can put an annotation for each date field, is better to do a global configuration for your object mapper. If you use jackson you can configure your spring as follow: <bean id=”jacksonObjectMapper” class=”com.company.CustomObjectMapper” /> <bean id=”jacksonSerializationConfig” class=”org.codehaus.jackson.map.SerializationConfig” factory-bean=”jacksonObjectMapper” factory-method=”getSerializationConfig” > </bean> For CustomObjectMapper: public class CustomObjectMapper extends ObjectMapper { public CustomObjectMapper() { super(); … Read more