{"action":"opened","issue":{"url":"https://api.github.com/repos/x-stream/xstream/issues/16","labels_url":"https://api.github.com/repos/x-stream/xstream/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/x-stream/xstream/issues/16/comments","events_url":"https://api.github.com/repos/x-stream/xstream/issues/16/events","html_url":"https://github.com/x-stream/xstream/issues/16","id":92151582,"number":16,"title":"@XStreamConverter and registerLocalConverter do not work on attribute fields","user":{"login":"jimmyli97","id":1155874,"avatar_url":"https://avatars.githubusercontent.com/u/1155874?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyli97","html_url":"https://github.com/jimmyli97","followers_url":"https://api.github.com/users/jimmyli97/followers","following_url":"https://api.github.com/users/jimmyli97/following{/other_user}","gists_url":"https://api.github.com/users/jimmyli97/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyli97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyli97/subscriptions","organizations_url":"https://api.github.com/users/jimmyli97/orgs","repos_url":"https://api.github.com/users/jimmyli97/repos","events_url":"https://api.github.com/users/jimmyli97/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyli97/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-30T17:27:44Z","updated_at":"2015-06-30T17:27:44Z","closed_at":null,"body":"I've so far been unable to come up with anything relating to this issue except for the following mailing list issue regarding this: http://markmail.org/thread/qkgmgewmplmav4kc\r\n\r\nThe following results in the local converter being ignored:\r\n```\r\npublic class Formula {\r\n@XStreamAlias(\"score\")\r\n@XStreamAsAttribute\r\n@XStreamConverter(ScoreConverter.class)\r\nprivate String score;\r\n}\r\n```\r\n\r\nI've also tried ```XStream.registerLocalConverter(Formula.class, \"score\", new ScoreConverter())```\r\n\r\nAccording to the mailing list, the only workaround is to write a custom converter for the entire class. This class has a lot of fields, and I'd much rather allow the default converter to take over for most of the fields and only handle the score field manually.\r\n\r\nIs there really no alternative but to write a custom converter for the entire class? \r\n\r\nAs a side note, what I'm trying to do is to make the attribute optional - as in, the score attribute will not show up if the score is empty. Is this the right way to go about doing so?"}}