{"action":"created","issue":{"url":"https://api.github.com/repos/jooby-project/jooby/issues/1088","repository_url":"https://api.github.com/repos/jooby-project/jooby","labels_url":"https://api.github.com/repos/jooby-project/jooby/issues/1088/labels{/name}","comments_url":"https://api.github.com/repos/jooby-project/jooby/issues/1088/comments","events_url":"https://api.github.com/repos/jooby-project/jooby/issues/1088/events","html_url":"https://github.com/jooby-project/jooby/pull/1088","id":322670597,"number":1088,"title":"Add @JsonView support to Jackson module","user":{"login":"huysamen","id":1388559,"avatar_url":"https://avatars0.githubusercontent.com/u/1388559?v=4","gravatar_id":"","url":"https://api.github.com/users/huysamen","html_url":"https://github.com/huysamen","followers_url":"https://api.github.com/users/huysamen/followers","following_url":"https://api.github.com/users/huysamen/following{/other_user}","gists_url":"https://api.github.com/users/huysamen/gists{/gist_id}","starred_url":"https://api.github.com/users/huysamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huysamen/subscriptions","organizations_url":"https://api.github.com/users/huysamen/orgs","repos_url":"https://api.github.com/users/huysamen/repos","events_url":"https://api.github.com/users/huysamen/events{/privacy}","received_events_url":"https://api.github.com/users/huysamen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-14T04:41:44Z","updated_at":"2018-05-15T21:02:45Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/jooby-project/jooby/pulls/1088","html_url":"https://github.com/jooby-project/jooby/pull/1088","diff_url":"https://github.com/jooby-project/jooby/pull/1088.diff","patch_url":"https://github.com/jooby-project/jooby/pull/1088.patch"},"body":"Adds `@JsonView` support to Jackson module."},"comment":{"url":"https://api.github.com/repos/jooby-project/jooby/issues/comments/389312454","html_url":"https://github.com/jooby-project/jooby/pull/1088#issuecomment-389312454","issue_url":"https://api.github.com/repos/jooby-project/jooby/issues/1088","id":389312454,"user":{"login":"jknack","id":1301129,"avatar_url":"https://avatars0.githubusercontent.com/u/1301129?v=4","gravatar_id":"","url":"https://api.github.com/users/jknack","html_url":"https://github.com/jknack","followers_url":"https://api.github.com/users/jknack/followers","following_url":"https://api.github.com/users/jknack/following{/other_user}","gists_url":"https://api.github.com/users/jknack/gists{/gist_id}","starred_url":"https://api.github.com/users/jknack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jknack/subscriptions","organizations_url":"https://api.github.com/users/jknack/orgs","repos_url":"https://api.github.com/users/jknack/repos","events_url":"https://api.github.com/users/jknack/events{/privacy}","received_events_url":"https://api.github.com/users/jknack/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T21:02:45Z","updated_at":"2018-05-15T21:02:45Z","author_association":"MEMBER","body":"Like it, but think we should do it a bit different using route attributes:\r\n\r\nScript:\r\n```\r\n  get(\"/:id\", req -> {\r\n    return ...;\r\n  }).attr(\"jsonView\", Views.Public.class);\r\n```\r\n\r\nMVC:\r\n\r\n```\r\n@JsonView(Views.Public.class)\r\npublic Item get(Long id) {\r\n  ...\r\n}\r\n```\r\n\r\nThis way we don't have to return `new JacksonView(Views.Public.class, data)`\r\n\r\nTo do this, we have to add a new `attr(String)` method to `Renderer.Context` so we can read it from jackson renderer.\r\n\r\nWhat do you think? Can you do it?"}}
{"actor":{"display_login":"jknack"}}