Skip to content

GSON Serialization/Deserialization of Java 8 Date API #1059

@reinaldomjr

Description

@reinaldomjr

When serializing / deserializing an object with the Date and Time classes of the new java.time API, the results are diferent from expected.

For example, here's a java.util.Date serialized with gson (using version 2.8.0):

"created": "2017-04-07T18:07:00",

and here's a java.time.LocalDate:

"expiration": {
"year": 2017,
"month": 4,
"day": 7
}

the expected result for javatime api was a ISO-8601.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementjava8Issues related to making Java 8 the minimum supported version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions