{"action":"created","issue":{"url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/103","repository_url":"https://api.github.com/repos/rharter/auto-value-moshi","labels_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/103/comments","events_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/103/events","html_url":"https://github.com/rharter/auto-value-moshi/issues/103","id":305071739,"number":103,"title":"Retrofit's MoshiRequestBodyConverter doesn't use the generated type adapters","user":{"login":"vibinr","id":3243556,"avatar_url":"https://avatars0.githubusercontent.com/u/3243556?v=4","gravatar_id":"","url":"https://api.github.com/users/vibinr","html_url":"https://github.com/vibinr","followers_url":"https://api.github.com/users/vibinr/followers","following_url":"https://api.github.com/users/vibinr/following{/other_user}","gists_url":"https://api.github.com/users/vibinr/gists{/gist_id}","starred_url":"https://api.github.com/users/vibinr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vibinr/subscriptions","organizations_url":"https://api.github.com/users/vibinr/orgs","repos_url":"https://api.github.com/users/vibinr/repos","events_url":"https://api.github.com/users/vibinr/events{/privacy}","received_events_url":"https://api.github.com/users/vibinr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-14T09:00:10Z","updated_at":"2018-03-23T12:15:25Z","closed_at":null,"author_association":"NONE","body":"Hi, while migrating from auto-value-gson to auto-value-moshi, I've realized the latter doesn't play well with `MoshiRequestBodyConverter`.\r\n\r\nI've a simple AutoValue class which has the `typeAdapter(Moshi)` method exposed - I can confirm that its fromJson is getting called while response is being deserialized, but the toJson is not called during serialization.\r\n\r\nThat is, Moshi's `ClassJsonAdapter` is being picked up instead of the generated TypeAdapter from the switch-case in `AutoValueMoshi_AutoValueMoshiTypeAdapterFactory`. I'm guessing this is because I'm passing in a `AutoValue_Foo` class in my body and the switch-case returns null instead of returning `TypeAdapter<Foo>`.\r\n\r\nI found a relevant commit which was reverted: https://github.com/rharter/auto-value-moshi/commit/57e0d1d4d5183ac99ced35b2ed2f2b00f337200e"},"comment":{"url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/comments/375647040","html_url":"https://github.com/rharter/auto-value-moshi/issues/103#issuecomment-375647040","issue_url":"https://api.github.com/repos/rharter/auto-value-moshi/issues/103","id":375647040,"user":{"login":"rharter","id":1296750,"avatar_url":"https://avatars3.githubusercontent.com/u/1296750?v=4","gravatar_id":"","url":"https://api.github.com/users/rharter","html_url":"https://github.com/rharter","followers_url":"https://api.github.com/users/rharter/followers","following_url":"https://api.github.com/users/rharter/following{/other_user}","gists_url":"https://api.github.com/users/rharter/gists{/gist_id}","starred_url":"https://api.github.com/users/rharter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rharter/subscriptions","organizations_url":"https://api.github.com/users/rharter/orgs","repos_url":"https://api.github.com/users/rharter/repos","events_url":"https://api.github.com/users/rharter/events{/privacy}","received_events_url":"https://api.github.com/users/rharter/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T12:15:24Z","updated_at":"2018-03-23T12:15:24Z","author_association":"OWNER","body":"You'll have to create your own type adapter to identify the types there.\nSince you're providing an Object there really isn't a way for Moshi to\nhandle this.\n\nOn Fri, Mar 23, 2018, 2:10 AM Vibin reddy <notifications@github.com> wrote:\n\n> I think this can solved by using @Body Map<String, Foo>, but I do want\n> the value generic argument to be Object, not Foo - because I want to put\n> other entries with value types like String, Integer etc into this container.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/rharter/auto-value-moshi/issues/103#issuecomment-375563995>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABPJbjtl7nO5y1Xu7V6zqOyIoDwX4YPUks5thJ_JgaJpZM4SqDK4>\n> .\n>\n"}}
{"actor":{"display_login":"rharter"}}