So I've got my Jackson and Joda support all set up...
ext.jackson = [version: '2.3.2']
...
compile "com.fasterxml.jackson.core:jackson-core:${jackson.version}"
compile "com.fasterxml.jackson.core:jackson-databind:${jackson.version}"
compile "com.fasterxml.jackson.core:jackson-annotations:${jackson.version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson.version}"
And my OjbectMapper configured to use the JodaModule() to format java.util.Dates
private static final ObjectMapper mapper = new ObjectMapper();
static {
// JodaModule gets Dates handled as ISO-8601 strings
JodaModule jodaModule = new JodaModule();
mapper.registerModule( jodaModule );
mapper.configure( SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false );
}
But I can't figure out how to get the JodaModlue to format the java.util.Date occurrences in my POJOs like "2014-02-07T21:29:19.032Z" rather than "2014-02-07T21:29:19.032+0000". When I do this "stand-alone" in Joda the incantation is ISODateTimeFormat.dateTime().withZoneUTC(). How can I jack that DateTimeFormatter into the JodaModule() I push into the ObjectMapper?