{"action":"created","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/1291","labels_url":"https://api.github.com/repos/square/retrofit/issues/1291/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1291/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/1291/events","html_url":"https://github.com/square/retrofit/issues/1291","id":117385851,"number":1291,"title":"Custom gson adapter doesn't work","user":{"login":"ductranit","id":2063905,"avatar_url":"https://avatars.githubusercontent.com/u/2063905?v=3","gravatar_id":"","url":"https://api.github.com/users/ductranit","html_url":"https://github.com/ductranit","followers_url":"https://api.github.com/users/ductranit/followers","following_url":"https://api.github.com/users/ductranit/following{/other_user}","gists_url":"https://api.github.com/users/ductranit/gists{/gist_id}","starred_url":"https://api.github.com/users/ductranit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ductranit/subscriptions","organizations_url":"https://api.github.com/users/ductranit/orgs","repos_url":"https://api.github.com/users/ductranit/repos","events_url":"https://api.github.com/users/ductranit/events{/privacy}","received_events_url":"https://api.github.com/users/ductranit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-17T15:57:34Z","updated_at":"2015-11-18T02:21:13Z","closed_at":null,"body":" I want to customize gson adapter with retrofit 2.0 beta 2 like this:\r\n\r\n```javascript\r\nGson gson = new GsonBuilder().registerTypeAdapter( MyData.class, new MyDataDeserializer() ).create();\r\n        Retrofit retrofit = new Retrofit.Builder()\r\n                .baseUrl(Config.SERVER_URL)\r\n                .addConverterFactory(GsonConverterFactory.create(gson))\r\n                .build();\r\n```\r\n\r\nbut the `deserialize` method isn't called:\r\n\r\n```javascript\r\npublic class MyDataDeserializer implements JsonDeserializer<MyData> {\r\n    @Override\r\n    public MyData deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\r\n      // NOT CALLED\r\n        JsonObject ja = json.getAsJsonObject();\r\n        MyData data = new Gson().fromJson(ja,MyData.class);\r\n\r\n\r\n        return data;\r\n    }\r\n}\r\n```\r\n\r\nIs there something wrong?"},"comment":{"url":"https://api.github.com/repos/square/retrofit/issues/comments/157575913","html_url":"https://github.com/square/retrofit/issues/1291#issuecomment-157575913","issue_url":"https://api.github.com/repos/square/retrofit/issues/1291","id":157575913,"user":{"login":"ductranit","id":2063905,"avatar_url":"https://avatars.githubusercontent.com/u/2063905?v=3","gravatar_id":"","url":"https://api.github.com/users/ductranit","html_url":"https://github.com/ductranit","followers_url":"https://api.github.com/users/ductranit/followers","following_url":"https://api.github.com/users/ductranit/following{/other_user}","gists_url":"https://api.github.com/users/ductranit/gists{/gist_id}","starred_url":"https://api.github.com/users/ductranit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ductranit/subscriptions","organizations_url":"https://api.github.com/users/ductranit/orgs","repos_url":"https://api.github.com/users/ductranit/repos","events_url":"https://api.github.com/users/ductranit/events{/privacy}","received_events_url":"https://api.github.com/users/ductranit/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T02:21:13Z","updated_at":"2015-11-18T02:21:13Z","body":"MyData is a base class of all response types"}}