Configuration

zio.schema.codec.JsonCodec.Configuration
See theConfiguration companion object
final case class Configuration(explicitEmptyCollections: ExplicitConfig = ..., explicitNulls: ExplicitConfig = ..., discriminatorSettings: DiscriminatorSetting = ..., fieldNameFormat: NameFormat = ..., treatStreamsAsArrays: Boolean = ..., rejectExtraFields: Boolean = ...)

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

Value parameters

discriminatorSettings

set up how to handle discriminators

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

fieldNameFormat

format for the field names

rejectExtraFields

whether to reject extra fields during decoding

treatStreamsAsArrays

whether to treat streams as arrays when encoding/decoding

Attributes

Companion
object
Source
JsonCodec.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala

Concrete fields

Attributes

Source
JsonCodec.scala