Packages

o

zio.schema.codec

JsonCodec

object JsonCodec

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonCodec
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Configuration(explicitEmptyCollections: ExplicitConfig = ExplicitConfig(), explicitNulls: ExplicitConfig = ExplicitConfig(), discriminatorSettings: DiscriminatorSetting = DiscriminatorSetting.default, fieldNameFormat: NameFormat = NameFormat.Identity, treatStreamsAsArrays: Boolean = false, rejectExtraFields: Boolean = false) extends Product with Serializable

    Configuration for the JSON codec.

    Configuration for the JSON codec. The configurations are overruled by the annotations that configure the same behavior.

    explicitEmptyCollections

    whether to encode empty collections as [] or omit the field and decode the field when it is missing as an empty collection or fail

    explicitNulls

    whether to encode empty Options as null or omit the field and decode the field when it is missing to None or fail

    discriminatorSettings

    set up how to handle discriminators

    fieldNameFormat

    format for the field names

    treatStreamsAsArrays

    whether to treat streams as arrays when encoding/decoding

    rejectExtraFields

    whether to reject extra fields during decoding

  2. sealed trait DiscriminatorSetting extends AnyRef
  3. type DiscriminatorTuple = Option[(String, String)]
  4. case class ExplicitConfig(encoding: Boolean = true, decoding: Boolean = false) extends Product with Serializable

    When disabled for encoding, matching fields will be omitted from the JSON.

    When disabled for encoding, matching fields will be omitted from the JSON. When disabled for decoding, missing fields will be decoded as the default value.

Deprecated Type Members

  1. final case class Config(ignoreEmptyCollections: Boolean, treatStreamsAsArrays: Boolean = false, explicitNulls: Boolean = false) extends Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.7) Use JsonCodec.Configuration instead. JsonCodec.Configuration makes it now possible to configure en-/decoding of empty collection and nulls (Options) independently.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def jsonCodec[A](cfg: Configuration)(schema: Schema[A]): JsonCodec[A]
  12. def jsonCodec[A](schema: Schema[A]): JsonCodec[A]
  13. def jsonDecoder[A](cfg: Configuration)(schema: Schema[A]): JsonDecoder[A]
  14. def jsonDecoder[A](schema: Schema[A]): JsonDecoder[A]
  15. def jsonEncoder[A](cfg: Configuration)(schema: Schema[A]): JsonEncoder[A]
  16. def jsonEncoder[A](schema: Schema[A]): JsonEncoder[A]
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def schemaBasedBinaryCodec[A](cfg: Configuration)(implicit schema: Schema[A]): BinaryCodec[A]
  21. implicit def schemaBasedBinaryCodec[A](implicit schema: Schema[A]): BinaryCodec[A]
  22. val splitJsonArrayElements: ZPipeline[Any, Nothing, String, String]
  23. val splitOnJsonBoundary: ZPipeline[Any, Nothing, String, String]
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. implicit def zioJsonBinaryCodec[A](implicit jsonCodec: JsonCodec[A]): BinaryCodec[A]
  30. object Codecs
  31. object Configuration extends Serializable
  32. object DiscriminatorSetting
  33. object JsonDecoder
  34. object JsonEncoder

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def jsonCodec[A](cfg: Config)(schema: Schema[A]): JsonCodec[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.7) Use Configuration based method instead

  3. def jsonEncoder[A](cfg: Config)(schema: Schema[A]): JsonEncoder[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.7) Use Configuration based method instead

  4. def schemaBasedBinaryCodec[A](cfg: Config)(implicit schema: Schema[A]): BinaryCodec[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.7) Use Configuration based method instead

  5. object Config extends Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.7) Use JsonCodec.Configuration instead. JsonCodec.Configuration makes it now possible to configure en-/decoding of empty collection and nulls (Options) independently.

Inherited from AnyRef

Inherited from Any

Ungrouped