How to decode an ADT with circe without disambiguating objects

Enumerating the ADT constructors The most straightforward way to get the representation you want is to use generic derivation for the case classes but explicitly defined instances for the ADT type: import cats.syntax.functor._ import io.circe.{ Decoder, Encoder }, io.circe.generic.auto._ import io.circe.syntax._ sealed trait Event case class Foo(i: Int) extends Event case class Bar(s: String) extends … Read more