{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/11","repository_url":"https://api.github.com/repos/FasterXML/jackson-future-ideas","labels_url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/11/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/11/events","html_url":"https://github.com/FasterXML/jackson-future-ideas/issues/11","id":181847671,"number":11,"title":"Annotation to prevent jackson to use JAXB annotations!","user":{"login":"SamSoldatenko","id":10289657,"avatar_url":"https://avatars.githubusercontent.com/u/10289657?v=3","gravatar_id":"","url":"https://api.github.com/users/SamSoldatenko","html_url":"https://github.com/SamSoldatenko","followers_url":"https://api.github.com/users/SamSoldatenko/followers","following_url":"https://api.github.com/users/SamSoldatenko/following{/other_user}","gists_url":"https://api.github.com/users/SamSoldatenko/gists{/gist_id}","starred_url":"https://api.github.com/users/SamSoldatenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamSoldatenko/subscriptions","organizations_url":"https://api.github.com/users/SamSoldatenko/orgs","repos_url":"https://api.github.com/users/SamSoldatenko/repos","events_url":"https://api.github.com/users/SamSoldatenko/events{/privacy}","received_events_url":"https://api.github.com/users/SamSoldatenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-08T20:41:56Z","updated_at":"2016-10-10T19:22:00Z","closed_at":null,"body":"Annotation to completely prevent jackson from using JAXB annotations!\r\nsee http://stackoverflow.com/questions/5005668/configure-jersey-jackson-to-not-use-xmlelement-field-annotation-for-json-field/5008595\r\n\r\n```java\r\n@JacksonDontUseJaxbAnnotationsInThisClassItIsNotForYou()\r\n@XmlRootElement\r\nclass X<T> {\r\n    @XmlElementRefs({\r\n       @XmlElementRef(name = \"y\", type = Y.class)\r\n    })\r\n    List<T> items;\r\n\r\n    @XmlElement(\"xmlname\")\r\n    String jsonName;\r\n}\r\nclass Y {\r\n    String a;\r\n    String b;\r\n}\r\n```\r\nShould produce\r\n````json\r\n{\r\n    \"items\": [\r\n        {\r\n            \"a\": null,\r\n            \"b\": null\r\n        }\r\n    ],\r\n    \"jsonName\": null\r\n}\r\n````"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/comments/252720411","html_url":"https://github.com/FasterXML/jackson-future-ideas/issues/11#issuecomment-252720411","issue_url":"https://api.github.com/repos/FasterXML/jackson-future-ideas/issues/11","id":252720411,"user":{"login":"cowtowncoder","id":55065,"avatar_url":"https://avatars.githubusercontent.com/u/55065?v=3","gravatar_id":"","url":"https://api.github.com/users/cowtowncoder","html_url":"https://github.com/cowtowncoder","followers_url":"https://api.github.com/users/cowtowncoder/followers","following_url":"https://api.github.com/users/cowtowncoder/following{/other_user}","gists_url":"https://api.github.com/users/cowtowncoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cowtowncoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowtowncoder/subscriptions","organizations_url":"https://api.github.com/users/cowtowncoder/orgs","repos_url":"https://api.github.com/users/cowtowncoder/repos","events_url":"https://api.github.com/users/cowtowncoder/events{/privacy}","received_events_url":"https://api.github.com/users/cowtowncoder/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T19:22:00Z","updated_at":"2016-10-10T19:22:00Z","body":"@SamSoldatenko Jackson does not support JAXB annotations by default. Optional support can be enabled using this module:\r\n\r\nhttps://github.com/FasterXML/jackson-module-jaxb-annotations/\r\n\r\nand specifically registering with:\r\n\r\n     objectMapper.registerModule(new JaxbAnnotationModule());\r\n\r\nNow: since you are having the issue, I suspect you are using Jackson via a framework that does enable JAXB annotation support by default. If so, it would be good to figure out a way to either prevent registration. If this is not feasible, it should still be possible to reset annotation introspection settings with\r\n\r\n     objectMapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector());\r\n\r\n(or just create new, plain `ObjectMapper` -- this is the default set up).\r\n\r\nI hope this helps.\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"cowtowncoder"}}