Closed anthonyleonard closed 9 months ago
Seems like this is something that could be documented on README.md
either at main level, or for Date/Time module.
Marking as easy
for new contributors.
It appears that only format for string values for property with type java.time.Instant
is java.time.format.DateTimeFormatter.ISO_INSTANT
Investigated on jackson-datatype-jsr310 version 2.9.0. In this line https://github.com/FasterXML/jackson-modules-java8/blob/2f7d955dbce5bd1e46cd80134aa82cb64b6d684f/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/JavaTimeModule.java#L141 used InstantDeserializer which supports only DateTimeFormatter.ISO_INSTANT
.
Is this worth documenting?
Yes, I think it's worth documenting, and answer's the OP's question:
What string formats will deserialise successfully to an Instant type, using a vanilla object mapper? [snip] my testers would like to know the range of possible date formats so they can test around it.
Now, as where to put the documentation, to answer Cowtowncoder's question,
Seems like this is something that could be documented on README.md either at main level, or for Date/Time module.
my suggestion would be the readme.md for the Date/Time because it seems to have that level of detail:
https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime
Looks like README was modified, closing.
What string formats will deserialise successfully to an Instant type, using a vanilla object mapper?
I would like to follow Postels law and be as wide as possible in accepting serialised time formats, but my testers would like to know the range of possible date formats so they can test around it.
Thanks :)