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
It looks like gson uses TreeTypeAdapter for JsonSerializer/JsonDeserializer type adapters.
TreeTypeAdapter is always nullSafe, so nullSafe value of JsonAdapter annotation is ignored in this case which is at least confusing.
I fixed this locally by adding nullSafe parameter to the TreeTypeAdapter and would love to submit a PR if it need be. Shall I go ahead?
Thanks!
The text was updated successfully, but these errors were encountered:
bufistov
pushed a commit
to bufistov/gson
that referenced
this issue
Jul 19, 2019
The JsonSerializer/Deserializer adapters used to ignore this attribute
which result in inconsistent behaviour for annotated adapters.
Fixesgoogle#1553
Signed-off-by: Dmitry Bufistov <dmitry@midokura.com>
The JsonSerializer/Deserializer adapters used to ignore this attribute
which result in inconsistent behaviour for annotated adapters.
Fixes#1553
Signed-off-by: Dmitry Bufistov <dmitry@midokura.com>
Co-authored-by: Dmitry Bufistov <dmitry@midokura.com>
Hi there,
It looks like gson uses TreeTypeAdapter for JsonSerializer/JsonDeserializer type adapters.
TreeTypeAdapter is always nullSafe, so nullSafe value of JsonAdapter annotation is ignored in this case which is at least confusing.
I fixed this locally by adding nullSafe parameter to the TreeTypeAdapter and would love to submit a PR if it need be. Shall I go ahead?
Thanks!
The text was updated successfully, but these errors were encountered: