{"action":"created","issue":{"url":"https://api.github.com/repos/dma-ais/AisLib/issues/35","repository_url":"https://api.github.com/repos/dma-ais/AisLib","labels_url":"https://api.github.com/repos/dma-ais/AisLib/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/dma-ais/AisLib/issues/35/comments","events_url":"https://api.github.com/repos/dma-ais/AisLib/issues/35/events","html_url":"https://github.com/dma-ais/AisLib/issues/35","id":346236563,"node_id":"MDU6SXNzdWUzNDYyMzY1NjM=","number":35,"title":"Unsupported operation in getEncoded() for messages type 17,21,24","user":{"login":"bushaev","id":7264821,"node_id":"MDQ6VXNlcjcyNjQ4MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7264821?v=4","gravatar_id":"","url":"https://api.github.com/users/bushaev","html_url":"https://github.com/bushaev","followers_url":"https://api.github.com/users/bushaev/followers","following_url":"https://api.github.com/users/bushaev/following{/other_user}","gists_url":"https://api.github.com/users/bushaev/gists{/gist_id}","starred_url":"https://api.github.com/users/bushaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bushaev/subscriptions","organizations_url":"https://api.github.com/users/bushaev/orgs","repos_url":"https://api.github.com/users/bushaev/repos","events_url":"https://api.github.com/users/bushaev/events{/privacy}","received_events_url":"https://api.github.com/users/bushaev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-31T15:20:43Z","updated_at":"2018-07-31T15:40:47Z","closed_at":null,"author_association":"NONE","body":"I'm trying to serialize AisMessages to Json using jackson, unfortunately it tries to serialize getEncoded(), which throws UnsupportedOperationException(). Is there a particular reason for this ? "},"comment":{"url":"https://api.github.com/repos/dma-ais/AisLib/issues/comments/409267197","html_url":"https://github.com/dma-ais/AisLib/issues/35#issuecomment-409267197","issue_url":"https://api.github.com/repos/dma-ais/AisLib/issues/35","id":409267197,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTI2NzE5Nw==","user":{"login":"tbsalling","id":669154,"node_id":"MDQ6VXNlcjY2OTE1NA==","avatar_url":"https://avatars2.githubusercontent.com/u/669154?v=4","gravatar_id":"","url":"https://api.github.com/users/tbsalling","html_url":"https://github.com/tbsalling","followers_url":"https://api.github.com/users/tbsalling/followers","following_url":"https://api.github.com/users/tbsalling/following{/other_user}","gists_url":"https://api.github.com/users/tbsalling/gists{/gist_id}","starred_url":"https://api.github.com/users/tbsalling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbsalling/subscriptions","organizations_url":"https://api.github.com/users/tbsalling/orgs","repos_url":"https://api.github.com/users/tbsalling/repos","events_url":"https://api.github.com/users/tbsalling/events{/privacy}","received_events_url":"https://api.github.com/users/tbsalling/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T15:40:47Z","updated_at":"2018-07-31T15:40:47Z","author_association":"CONTRIBUTOR","body":"No, not really. You could say, that `getEncoded` is poorly named, because it is not really a bean property.\r\n\r\nI see three possible solutions:\r\n1) Rename `getEncoded` to something else (which breaks compatibility)\r\n2) Add `@JsonIgnore` to the method (which adds an extra dependency)\r\n3) Write a custom Json serializer for AISMessage.\r\n\r\nGiven the disadvantages of 1) and 2) I tend to prefer option 3).\r\n\r\nIf you see other solutions you are welcome to bring them to the table or to submit a pull request."}}
{"actor":{"display_login":"tbsalling"}}