abstract class WithCirce[A] extends AnyRef
Requires library dependency on "io.circe" %% "circe-derivation" % "0.13.0-M5"
or later (NOT brought in as a dependency automatically)
Provides circe codecs for case classes and sealed traits
final case class Abc(a: String, b: String, c: String) object Abc extends WithCirce[Abc]
To derive codecs for a sealed trait with branches inside its own companion object, use a proxy object - this works around a scala limitation: https://github.com/milessabin/shapeless/issues/837
sealed trait Abc private abcCodecs extends WithCirce[Abc] object Abc extends WithCirce(abcCodecs) { final case class A() object A extends WithCirce[A] final case class B() object B extends WithCirce[B] final case class C() object C extends WithCirce[C] }
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- WithCirce
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new WithCirce(proxy: WithCirce[A])
- new WithCirce()(implicit derivedCodec: DerivationDerivedCodec[A])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit val codec: AsObject[A]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()