-
Notifications
You must be signed in to change notification settings - Fork 103
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
Unable to Serialize null field #67
Comments
ansman
pushed a commit
to ansman/auto-value-gson
that referenced
this issue
Oct 24, 2016
This closes rharter#23, rharter#50 and rharter#67
ansman
added a commit
to ansman/auto-value-gson
that referenced
this issue
Oct 24, 2016
This closes rharter#23, rharter#50 and rharter#67
ansman
added a commit
to ansman/auto-value-gson
that referenced
this issue
Oct 24, 2016
This closes rharter#23, rharter#50 and rharter#67
rharter
pushed a commit
that referenced
this issue
Oct 25, 2016
Closed by #78 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a need to serialize a null field. When I mark the field as
@Nullable
, I see the GsonTypeAdapterwrite(JsonWriter, Object)
method wrap the field adapter'swrite()
call in a null check. But if I remove@Nullable
, my builder/factory methods complain about the null value. Is there any way around this?It looks like 23 could be related?
For clarity, I am calling serializeNulls in my GsonBuilder. Perhaps the write method's GsonTypeAdapter could check that flag in the JsonWriter to bypass the above mentioned null check?
The text was updated successfully, but these errors were encountered: