google / google/gson

java.util.date Java 11 vs Java 8 different serialization

Open
#1,719 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

I don't know what to make of this, whether its a bug or not - but I think its worth mentioning. If you serialize a `java.util.Date` object, this is what you get with gson 2.8.0

**Java 8** `{"creationDate":"Jun 10, 2020 11:13:39 AM"}`
**Java 11** `{"creationDate":"Jun 10, 2020, 11:14:17 AM"}`

see the extra `,` after the year? Java 11 serialized java.util.Date is not deserializable in Java 8.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.