io.circe.generic
package io.circe.generic
Members list
Type members
Classlikes
trait AutoDerivation
Fully automatic codec derivation.
Fully automatic codec derivation.
Extending this trait provides io.circe.Decoder and io.circe.Encoder instances for case classes (if all members have instances), sealed trait hierarchies, etc.
Attributes
- Source
- auto.scala
- Supertypes
- Known subtypes
-
object auto
object auto extends AutoDerivation
Attributes
- Source
- auto.scala
- Supertypes
- Self type
-
auto.type
object semiauto
Semi-automatic codec derivation.
Semi-automatic codec derivation.
This object provides helpers for creating io.circe.Decoder and io.circe.ObjectEncoder instances for case classes, "incomplete" case classes, sealed trait hierarchies, etc.
Typical usage will look like the following:
import io.circe._, io.circe.generic.semiauto._
case class Foo(i: Int, p: (String, Double))
object Foo {
implicit val decodeFoo: Decoder[Foo] = deriveDecoder[Foo]
implicit val encodeFoo: Encoder.AsObject[Foo] = deriveEncoder[Foo]
}
Attributes
- Source
- semiauto.scala
- Supertypes
- Self type
-
semiauto.type
In this article