{"action":"opened","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/996","labels_url":"https://api.github.com/repos/square/retrofit/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/996/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/996/events","html_url":"https://github.com/square/retrofit/issues/996","id":99507570,"number":996,"title":"Enums serialisation in @Query/@Part parameters","user":{"login":"alex-shpak","id":5515443,"avatar_url":"https://avatars.githubusercontent.com/u/5515443?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-shpak","html_url":"https://github.com/alex-shpak","followers_url":"https://api.github.com/users/alex-shpak/followers","following_url":"https://api.github.com/users/alex-shpak/following{/other_user}","gists_url":"https://api.github.com/users/alex-shpak/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-shpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-shpak/subscriptions","organizations_url":"https://api.github.com/users/alex-shpak/orgs","repos_url":"https://api.github.com/users/alex-shpak/repos","events_url":"https://api.github.com/users/alex-shpak/events{/privacy}","received_events_url":"https://api.github.com/users/alex-shpak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-06T19:29:13Z","updated_at":"2015-08-06T19:29:13Z","closed_at":null,"body":"Hi guys. In my service I have\r\n```\r\n@Multipart\r\n@POST(\"/images/\")\r\nvoid postImage(@Part(\"file\") TypedOutput image, @Part(\"image_type\") Image.ImageType type, Callback<Image> cb);\r\n```\r\nWhere `Image.ImageType` is enum\r\n```\r\npublic enum ImageType {\r\n    attachment, cover, avatar\r\n}\r\n```\r\nUnfortunately enums serializing using `Converter.toBody(object)` which converting it as JSON string, what is correct according to the [docs](http://square.github.io/retrofit/javadoc/retrofit/http/Part.html)\r\n\r\nConverting as JSON string means that `GSON` adding leading and trailing quotes to the value, \r\nSo, is there possibility or workaround to serialize enums as `toString()` value?\r\n\r\nI can't use `TypeAdapter` in `GSON` for enums because it will break serialization in other places.\r\nAnd I would like to avoid calling `Image.ImageType.attachment.name()` each time."}}