{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/804","labels_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/804/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/804/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/804/events","html_url":"https://github.com/FasterXML/jackson-databind/issues/804","id":81102760,"number":804,"title":"@JsonView doesn't seem to work with Generic Types","user":{"login":"dennisa","id":1111013,"avatar_url":"https://avatars.githubusercontent.com/u/1111013?v=3","gravatar_id":"","url":"https://api.github.com/users/dennisa","html_url":"https://github.com/dennisa","followers_url":"https://api.github.com/users/dennisa/followers","following_url":"https://api.github.com/users/dennisa/following{/other_user}","gists_url":"https://api.github.com/users/dennisa/gists{/gist_id}","starred_url":"https://api.github.com/users/dennisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennisa/subscriptions","organizations_url":"https://api.github.com/users/dennisa/orgs","repos_url":"https://api.github.com/users/dennisa/repos","events_url":"https://api.github.com/users/dennisa/events{/privacy}","received_events_url":"https://api.github.com/users/dennisa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-26T19:31:22Z","updated_at":"2015-05-27T17:38:30Z","closed_at":null,"body":"I have a class defined as\r\n\r\n```java\r\n@JsonTypeInfo(\r\nuse = JsonTypeInfo.Id.NAME,\r\ninclude = JsonTypeInfo.As.PROPERTY,\r\nproperty = \"type\")\r\n@JsonSubTypes({\r\n@JsonSubTypes.Type(value = MyEvent.class, name = \"myevent\"),\r\n})\r\npublic abstract class Event<D>\r\n{\r\nprivate D data;\r\n...\r\n}\r\n```\r\n\r\nMy event is defined as\r\n\r\n```java\r\npublic class MyEvent extends Event<User>\r\n{\r\n\r\n}\r\n```\r\n\r\nAnd User is defined as\r\n\r\n```java\r\npublic class User\r\n{\r\n@JsonView({ Views.Meta.class })\r\nprivate final String username;\r\n\r\nprivate final String first;\r\n\r\nprivate final String last;\r\n}\r\n```\r\n\r\nHowever, in my JaxRS web service the username is still getting serialized out when inside the MyEvent class, but on its won (standalone User) it excludes the serialization of the username.\r\n\r\n\r\nI also tried this using OBJECT_MAPPER.writerWithView(Views.Meta.class).writeValueAsString(myEventInstance)\r\n\r\nAnd again, it seems to ignore the @JsonView annotation\r\n"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/comments/106007573","html_url":"https://github.com/FasterXML/jackson-databind/issues/804#issuecomment-106007573","issue_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/804","id":106007573,"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":"2015-05-27T17:38:30Z","updated_at":"2015-05-27T17:38:30Z","body":"Ok, first things first. If you can reproduce this outside of JAX-RS, that would be great.\r\nAlternatively, could you include JAX-RS resource end point declaration? Without that it might not be possible to reproduce the issue."}}