{"action":"created","issue":{"url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/43","repository_url":"https://api.github.com/repos/rharter/auto-value-moshi","labels_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/43/comments","events_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/43/events","html_url":"https://github.com/rharter/auto-value-moshi/issues/43","id":159670879,"number":43,"title":"Skipping NULL values.","user":{"login":"mipreamble","id":2266388,"avatar_url":"https://avatars.githubusercontent.com/u/2266388?v=3","gravatar_id":"","url":"https://api.github.com/users/mipreamble","html_url":"https://github.com/mipreamble","followers_url":"https://api.github.com/users/mipreamble/followers","following_url":"https://api.github.com/users/mipreamble/following{/other_user}","gists_url":"https://api.github.com/users/mipreamble/gists{/gist_id}","starred_url":"https://api.github.com/users/mipreamble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipreamble/subscriptions","organizations_url":"https://api.github.com/users/mipreamble/orgs","repos_url":"https://api.github.com/users/mipreamble/repos","events_url":"https://api.github.com/users/mipreamble/events{/privacy}","received_events_url":"https://api.github.com/users/mipreamble/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-06-10T16:16:14Z","updated_at":"2016-07-20T15:00:37Z","closed_at":null,"body":"Generated JsonAdapter skips null values. [AutoValueMoshiExtension](https://github.com/rharter/auto-value-moshi/blob/master/src/main/java/com/ryanharter/auto/value/moshi/AutoValueMoshiExtension.java#L365)\r\n\r\nIs there a way I can overcome this ?\r\nI would like the field to gave a default value. It is not a primitive type.\r\n"},"comment":{"url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/comments/233976451","html_url":"https://github.com/rharter/auto-value-moshi/issues/43#issuecomment-233976451","issue_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/43","id":233976451,"user":{"login":"shaunkawano","id":920911,"avatar_url":"https://avatars.githubusercontent.com/u/920911?v=3","gravatar_id":"","url":"https://api.github.com/users/shaunkawano","html_url":"https://github.com/shaunkawano","followers_url":"https://api.github.com/users/shaunkawano/followers","following_url":"https://api.github.com/users/shaunkawano/following{/other_user}","gists_url":"https://api.github.com/users/shaunkawano/gists{/gist_id}","starred_url":"https://api.github.com/users/shaunkawano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaunkawano/subscriptions","organizations_url":"https://api.github.com/users/shaunkawano/orgs","repos_url":"https://api.github.com/users/shaunkawano/repos","events_url":"https://api.github.com/users/shaunkawano/events{/privacy}","received_events_url":"https://api.github.com/users/shaunkawano/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T15:00:37Z","updated_at":"2016-07-20T15:00:37Z","body":"@mipreamble \r\n\r\n> default value for the current extension will always be null.\r\n\r\nYou're right. But I also agree with @swankjesse and I don’t think this is the JSON adapter’s job as well.\r\n\r\n> Is it possible to replace to defaults in the current AutoValue extension?\r\n\r\nRecently I had the same problem; I am using AutoValue extension, Moshi, and this library, and I wanted to make use all of them but also avoid annotating fields with `@Nullable` for actually nullable fields inside java models. \r\n\r\nEventually I decided not to use this library to generate codes for de/serializing AutoValue class, but instead adding custom JsonAdapter to serialize JSON using [`@AutoValue.Builder to specify default values](https://github.com/google/auto/blob/master/value/userguide/builders-howto.md#-specify-a-default-value-for-a-property) if any value from the server is `null`.\r\n\r\nI'd like to know if there is any better way though! :bow:"}}
{"actor":{"display_login":"shaunkawano"}}