{"action":"closed","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/764","repository_url":"https://api.github.com/repos/immutables/immutables","labels_url":"https://api.github.com/repos/immutables/immutables/issues/764/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/764/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/764/events","html_url":"https://github.com/immutables/immutables/issues/764","id":312257271,"number":764,"title":"The generated gson type adaptor deserialize json with unknown fields","user":{"login":"wolfjiang","id":8174179,"avatar_url":"https://avatars2.githubusercontent.com/u/8174179?v=4","gravatar_id":"","url":"https://api.github.com/users/wolfjiang","html_url":"https://github.com/wolfjiang","followers_url":"https://api.github.com/users/wolfjiang/followers","following_url":"https://api.github.com/users/wolfjiang/following{/other_user}","gists_url":"https://api.github.com/users/wolfjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfjiang/subscriptions","organizations_url":"https://api.github.com/users/wolfjiang/orgs","repos_url":"https://api.github.com/users/wolfjiang/repos","events_url":"https://api.github.com/users/wolfjiang/events{/privacy}","received_events_url":"https://api.github.com/users/wolfjiang/received_events","type":"User","site_admin":false},"labels":[{"id":177270080,"url":"https://api.github.com/repos/immutables/immutables/labels/completed","name":"completed","color":"006b75","default":false},{"id":46751410,"url":"https://api.github.com/repos/immutables/immutables/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/immutables/immutables/milestones/68","html_url":"https://github.com/immutables/immutables/milestone/68","labels_url":"https://api.github.com/repos/immutables/immutables/milestones/68/labels","id":2697669,"number":68,"title":"2.6","description":null,"creator":{"login":"elucash","id":1692611,"avatar_url":"https://avatars1.githubusercontent.com/u/1692611?v=4","gravatar_id":"","url":"https://api.github.com/users/elucash","html_url":"https://github.com/elucash","followers_url":"https://api.github.com/users/elucash/followers","following_url":"https://api.github.com/users/elucash/following{/other_user}","gists_url":"https://api.github.com/users/elucash/gists{/gist_id}","starred_url":"https://api.github.com/users/elucash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucash/subscriptions","organizations_url":"https://api.github.com/users/elucash/orgs","repos_url":"https://api.github.com/users/elucash/repos","events_url":"https://api.github.com/users/elucash/events{/privacy}","received_events_url":"https://api.github.com/users/elucash/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":39,"state":"open","created_at":"2017-08-12T08:04:04Z","updated_at":"2018-05-20T06:25:38Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2018-04-08T00:42:38Z","updated_at":"2018-05-20T06:25:38Z","closed_at":"2018-05-20T06:25:38Z","author_association":"NONE","body":"There is a request that deserialize json put the unknown fields on a specified fields, how I do it ? for example, entity is Contact:\r\n\r\n```java\r\n@Gson.TypeAdapters\r\n@Value.Immutable\r\npublic Contact {\r\n    Long getId();\r\n    String getName();\r\n    JsonObject getOtherFields();\r\n}\r\n```\r\n\r\nThe json string is : \r\n\r\n```json\r\n{\r\n    \"id\": 1,\r\n    \"name\": \"my name\",\r\n    \"custField1\": \"cust string field\",\r\n   \"custField2\": 2\r\n}\r\n```\r\n\r\nAfter gson  deserialized, the expected Contact Object is(Json format):\r\n\r\n```json\r\n    {\r\n        \"id\": 1,\r\n       \"name\": \"my nqme\",\r\n      \"otherFields\": {\r\n           \"custField1\": \"cust string field\",\r\n           \"custField2\": 2\r\n      }\r\n    }\r\n```\r\n\r\nI dig into the generated GsonAdaptorsContact.java, found that in method  `eachAttribute(JsonReader in, ImmutableDepartment.Builder builder)` , the unknown fields is skip by `in.skipValue();`. is there a configable feature than put unknows fields to a specified fields, or give me a unknown fields handler to do it myself? \r\n \r\nSorry for my poor Englisth, any advice is welcome, thanks."}}
{"actor":{"display_login":"elucash"}}