Last active
December 16, 2015 21:29
-
-
Save znbailey/5499954 to your computer and use it in GitHub Desktop.
trying to get ISO8601 dates in dropwizard JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void run(ApiServiceConfiguration config, Environment env) throws Exception { | |
... | |
// works | |
env.getObjectMapperFactory().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")); | |
// works | |
env.getObjectMapperFactory().setDateFormat(new ISO8601DateFormat.getInstance()); | |
// doesn't work | |
env.getObjectMapperFactory().setDateFormat(ISO8601DateFormat.getInstance()); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment