On Wed, Sep 19, 2018 at 11:13 AM <[email protected]> wrote:
>
> As I know springboot uses jackson.  I try to update my project's springboot 
> version from 1.5.1 to 2.0.1. And I find the date format is different in that 
> two versions.
>
> public class Message {
>      private Instant instant;
>
> }
>
>
> In springboot  1.5.1:
>
> {
>     "instant": {
>          "epochSecond": 1537263091,
>          "nano": 557000000
>     }
> }
>
>
>
> In springboot  2.0.1:
>
> {
>      "instant": "2018-09-18T09:46:02.646Z"
> }
>
>
> How can I use the 1.5.1 date format when I am using springboot 2.0.1?

You would probably find more information on Spring Boot mailing list,
but if I had to guess 1.5.1 does not seem to have Java 8 date/time
serializers, and uses POJO introspection instead. 2.0.1 probably adds
the module, producing proper ISO-8601 output.
I don't think there is a way to get 1.5.1 style output since that is
problematic for reading (there is no way to read back such values).

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to