-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.8.1 can't serialize and deserialize date null (2.8.0 works fine) #1096
Comments
Can you create a PR with a failing test? Thanks. |
Having similar issue in serialization.
throws if you remove
|
Faced the same issue with 2.8.1. |
Hi, This is my workaround for this bug, waiting for 2.8.2:
Hope it will help BR |
Nice @bmarty . |
@rafa0809 yes, indeed! |
Facing the same . |
…ntract (#1100) * Fixed DefaultDateTypeAdapter nullability issue and JSON primitives contract Regression in: * b8f616c - Migrate DefaultDateTypeAdapter to streaming adapter (#1070) Bug reports: * #1096 - 2.8.1 can't serialize and deserialize date null (2.8.0 works fine) * #1098 - Gson 2.8.1 DefaultDateTypeAdapter is not null safe. * Fixed DefaultDateTypeAdapter nullability on write
…ntract (google#1100) * Fixed DefaultDateTypeAdapter nullability issue and JSON primitives contract Regression in: * b8f616c - Migrate DefaultDateTypeAdapter to streaming adapter (google#1070) Bug reports: * google#1096 - 2.8.1 can't serialize and deserialize date null (2.8.0 works fine) * google#1098 - Gson 2.8.1 DefaultDateTypeAdapter is not null safe. * Fixed DefaultDateTypeAdapter nullability on write
it worked for me @bmarty |
gson/gson/src/main/java/com/google/gson/DefaultDateTypeAdapter.java
Line 95 in b8f616c
this will trows JsonParseException
this is my conf
new GsonBuilder().serializeNulls().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").create()
The text was updated successfully, but these errors were encountered: