{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/3934","labels_url":"https://api.github.com/repos/playframework/playframework/issues/3934/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/3934/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/3934/events","html_url":"https://github.com/playframework/playframework/issues/3934","id":57747021,"number":3934,"title":"Should Reads[A] be covariant in A?","user":{"login":"mvanderkolff","id":213667,"avatar_url":"https://avatars.githubusercontent.com/u/213667?v=3","gravatar_id":"","url":"https://api.github.com/users/mvanderkolff","html_url":"https://github.com/mvanderkolff","followers_url":"https://api.github.com/users/mvanderkolff/followers","following_url":"https://api.github.com/users/mvanderkolff/following{/other_user}","gists_url":"https://api.github.com/users/mvanderkolff/gists{/gist_id}","starred_url":"https://api.github.com/users/mvanderkolff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvanderkolff/subscriptions","organizations_url":"https://api.github.com/users/mvanderkolff/orgs","repos_url":"https://api.github.com/users/mvanderkolff/repos","events_url":"https://api.github.com/users/mvanderkolff/events{/privacy}","received_events_url":"https://api.github.com/users/mvanderkolff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-02-15T21:30:58Z","updated_at":"2015-02-16T21:19:32Z","closed_at":"2015-02-16T21:19:32Z","body":"Use case: https://mvdkolff.wordpress.com/2015/02/15/path-dependent-types-tagged-unions-and-play-for-scala/\r\n\r\nWithout the type wrapper, I get\r\n\r\nfound   : play.api.libs.json.Reads[_1] where type _1 >: z.Request <: models.ReportKinds.RunnableReport\r\n[error]  required: play.api.libs.json.Reads[models.ReportKinds.RunnableReport]\r\n[error] Note: _1 <: models.ReportKinds.RunnableReport, but trait Reads is invariant in type A\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/74573962","html_url":"https://github.com/playframework/playframework/issues/3934#issuecomment-74573962","issue_url":"https://api.github.com/repos/playframework/playframework/issues/3934","id":74573962,"user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T21:19:32Z","updated_at":"2015-02-16T21:19:32Z","body":"Closing this issue since I think we're agreed that no changes are needed.\r\n\r\n@julienrf It'd be nice to see JSON macros in play-json to support union types. I'd also really like something that takes case objects extending a sealed trait/class and serializes to strings.\r\n\r\nI think it's still okay for `Writes[A]` to be contravariant as long as we assume the representation of some type `A` is the same across your application. But that's probably also a discussion for elsewhere..."}}