You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If json has time field represented as number of milliseconds InstantConverter failed to deserialize it
java.time.format.DateTimeParseException: Text '1472545956124' could not be parsed at index 0
The text was updated successfully, but these errors were encountered:
longtimeago
changed the title
InstantConverter failed to create Instant from long value
InstantConverter failed to create Instant from number value
Sep 10, 2016
Presently all the converters are only designed to "round-trip" their data. In the case of the Instant, the JSON form is 2016-09-11T22:41:51.335Z - the expected format it isn't the epoch value as a number.
I don't get a lot of time to work on this project - and the round-tripping of values currently meets my personal needs. That said, if you're able to to propose a converter configuration strategy that we can agree on, and provide the pull requests, I am happy to merge it and then release it to Maven Central.
Off the top of my head, it seems Instant is the only class that can accurately be represented by an epoch alone, so the deserialisation side could simply check for that format and parse that way if needed. However, that's sub-optimal in that it only solves the deserialisation side.
If json has time field represented as number of milliseconds
InstantConverter
failed to deserialize itThe text was updated successfully, but these errors were encountered: