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
We require sending null values for fields within our request body json to our API. However, the nullable fields never get serialized. From our investigations this seems to be an auto-value-moshi issue.
I think our use case and issue is similar to issue-126.
We have tried the proposed solution from the issue above, but the problem is that within the generated toJson method, the writer (which has serializeNulls = true) is only accessed within a field != null if statement, so the nullable field is never added to the json object to be written.
We require sending null values for fields within our request body json to our API. However, the nullable fields never get serialized. From our investigations this seems to be an auto-value-moshi issue.
I think our use case and issue is similar to issue-126.
We have tried the proposed solution from the issue above, but the problem is that within the generated
toJson
method, the writer (which has serializeNulls = true) is only accessed within afield != null
if statement, so the nullable field is never added to the json object to be written.Here is a sample project we've written to demonstrate the issue. Please see the SerializeTest test class.
The text was updated successfully, but these errors were encountered: