Package

io.circe.generic

extras

Permalink

package extras

Visibility
  1. Public
  2. All

Type Members

  1. trait AutoDerivation extends AnyRef

    Permalink

    Fully automatic configurable codec derivation.

    Fully automatic configurable codec derivation.

    Extending this trait provides io.circe.Decoder and io.circe.Encoder instances for case classes (if all members have instances), "incomplete" case classes, sealed trait hierarchies, etc.

  2. class ConfigurableDeriver extends DerivationMacros[ReprDecoder, ReprObjectEncoder, ConfiguredDecoder, ConfiguredObjectEncoder]

    Permalink
  3. final case class Configuration(transformMemberNames: (String) ⇒ String, transformConstructorNames: (String) ⇒ String, useDefaults: Boolean, discriminator: Option[String]) extends Product with Serializable

    Permalink

    Configuration allowing customisation of the JSON produced when encoding, or expected when decoding.

    Configuration allowing customisation of the JSON produced when encoding, or expected when decoding. Can be used with the ConfiguredJsonCodec annotation to allow customisation of the semi-automatic derivation.

    transformMemberNames

    Transforms the names of any case class members in the JSON allowing, for example, formatting or case changes.

    transformConstructorNames

    Transforms the value of any constructor names in the JSON allowing, for example, formatting or case changes.

    useDefaults

    Whether to allow default values as specified for any case-class members.

    discriminator

    Optional key name that, when given, will be used to store the name of the constructor of an ADT in a nested field with this name. If not given, the name is instead stored as a key under which the contents of the ADT are stored as an object.

  4. macro class ConfiguredJsonCodec extends Annotation with StaticAnnotation

    Permalink
    Annotations
    @compileTimeOnly( ... )
  5. final case class JsonKey(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

Value Members

  1. object Configuration extends Serializable

    Permalink
  2. package decoding

    Permalink
  3. object defaults

    Permalink
  4. package encoding

    Permalink
  5. object semiauto

    Permalink

    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: ObjectEncoder[Foo] = deriveEncoder[Foo]
    }
  6. package util

    Permalink

Ungrouped