Packages

package extras

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait AutoDerivation extends AnyRef

    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, ReprAsObjectEncoder, ReprAsObjectCodec, ConfiguredDecoder, ConfiguredAsObjectEncoder, ConfiguredAsObjectCodec]
  3. final case class Configuration(transformMemberNames: (String) ⇒ String, transformConstructorNames: (String) ⇒ String, useDefaults: Boolean, discriminator: Option[String], strictDecoding: Boolean = false) extends Product with Serializable

    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.

    strictDecoding

    Whether to fail when superfluous fields are found.

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

Value Members

  1. object Configuration extends Serializable
  2. object defaults
  3. object semiauto

    Semi-automatic codec derivation.

    Semi-automatic codec derivation.

    This object provides helpers for creating io.circe.Decoder and io.circe.Encoder.AsObject 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] = deriveConfiguredDecoder[Foo]
      implicit val encodeFoo: Encoder.AsObject[Foo] = deriveConfiguredEncoder[Foo]
    }

Ungrouped