object JsonCodec
- Alphabetic
- By Inheritance
- JsonCodec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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
nullor 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
- sealed trait DiscriminatorSetting extends AnyRef
- type DiscriminatorTuple = Option[(String, String)]
- 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
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def jsonCodec[A](cfg: Configuration)(schema: Schema[A]): JsonCodec[A]
- def jsonCodec[A](schema: Schema[A]): JsonCodec[A]
- def jsonDecoder[A](cfg: Configuration)(schema: Schema[A]): JsonDecoder[A]
- def jsonDecoder[A](schema: Schema[A]): JsonDecoder[A]
- def jsonEncoder[A](cfg: Configuration)(schema: Schema[A]): JsonEncoder[A]
- def jsonEncoder[A](schema: Schema[A]): JsonEncoder[A]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def schemaBasedBinaryCodec[A](cfg: Configuration)(implicit schema: Schema[A]): BinaryCodec[A]
- implicit def schemaBasedBinaryCodec[A](implicit schema: Schema[A]): BinaryCodec[A]
- val splitJsonArrayElements: ZPipeline[Any, Nothing, String, String]
- val splitOnJsonBoundary: ZPipeline[Any, Nothing, String, String]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- implicit def zioJsonBinaryCodec[A](implicit jsonCodec: JsonCodec[A]): BinaryCodec[A]
- object Codecs
- object Configuration extends Serializable
- object DiscriminatorSetting
- object JsonDecoder
- object JsonEncoder
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def jsonCodec[A](cfg: Config)(schema: Schema[A]): JsonCodec[A]
- Annotations
- @deprecated
- Deprecated
(Since version 1.6.7) Use Configuration based method instead
- def jsonEncoder[A](cfg: Config)(schema: Schema[A]): JsonEncoder[A]
- Annotations
- @deprecated
- Deprecated
(Since version 1.6.7) Use Configuration based method instead
- def schemaBasedBinaryCodec[A](cfg: Config)(implicit schema: Schema[A]): BinaryCodec[A]
- Annotations
- @deprecated
- Deprecated
(Since version 1.6.7) Use Configuration based method instead
- 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.