izumi.fundamentals.json.circe

Members list

Type members

Classlikes

final case class DerivationDerivedCodec[A](value: AsObject[A]) extends AnyVal

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final case class DerivationDerivedDecoder[A](value: Decoder[A]) extends AnyVal

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final case class DerivationDerivedEncoder[A](value: AsObject[A]) extends AnyVal

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
abstract class WithCirce[A]()(implicit derivedCodec: => DerivationDerivedCodec[A])

Provides circe codecs for case classes and sealed traits

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]
 }

Attributes

Supertypes
class Object
trait Matchable
class Any