Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<stuff> is not case class or a sealed trait #23

Closed
enlait opened this issue Jul 12, 2018 · 0 comments
Closed

<stuff> is not case class or a sealed trait #23

enlait opened this issue Jul 12, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@enlait
Copy link

enlait commented Jul 12, 2018

Tethys does not derive writer for a sealed hierarchy even when writers for subtypes are explicitly defined

  import tethys._
  import tethys.jackson._
  import tethys.derivation.semiauto._


  sealed trait Foo

  object Foo {
    object Bar extends Foo
    class Baz extends Foo
  }

  implicit val BarWriter: JsonObjectWriter[Foo.Bar.type] =
    JsonWriter.obj[Foo.Bar.type]

  implicit val BazWriter: JsonObjectWriter[Foo.Baz] =
    JsonWriter.obj[Foo.Baz]

  implicit val FooWriter: JsonWriter[Foo] = jsonWriter
@eld0727 eld0727 added this to the v0.6.3.1 milestone Jul 12, 2018
@eld0727 eld0727 self-assigned this Jul 12, 2018
@eld0727 eld0727 added the bug label Jul 12, 2018
eld0727 added a commit that referenced this issue Jul 12, 2018
@eld0727 eld0727 closed this as completed Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants