JsonCodecConfiguration

zio.json.JsonCodecConfiguration
See theJsonCodecConfiguration companion object
final case class JsonCodecConfiguration(sumTypeHandling: SumTypeHandling = ..., fieldNameMapping: JsonMemberFormat = ..., allowExtraFields: Boolean = ..., sumTypeMapping: JsonMemberFormat = ..., explicitNulls: Boolean = ..., explicitEmptyCollections: ExplicitEmptyCollections = ..., enumValuesAsStrings: Boolean = ...)

Implicit codec derivation configuration.

Value parameters

allowExtraFields

see jsonNoExtraFields

enumValuesAsStrings

turns on serialization of enum values and sealed trait's case objects as strings

explicitEmptyCollections

turns on explicit serialization of fields with empty collections

explicitNulls

turns on explicit serialization of optional fields with None values

fieldNameMapping

see jsonMemberNames

sumTypeHandling

see jsonDiscriminator

sumTypeMapping

see jsonHintNames

Attributes

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

Members list

Value members

Constructors

def this(sumTypeHandling: SumTypeHandling, fieldNameMapping: JsonMemberFormat, allowExtraFields: Boolean, sumTypeMapping: JsonMemberFormat, explicitNulls: Boolean, explicitEmptyCollections: ExplicitEmptyCollections)

Attributes

Source
JsonCodecConfiguration.scala
def this(sumTypeHandling: SumTypeHandling, fieldNameMapping: JsonMemberFormat, allowExtraFields: Boolean, sumTypeMapping: JsonMemberFormat, explicitNulls: Boolean)

Attributes

Source
JsonCodecConfiguration.scala

Concrete methods

def copy(sumTypeHandling: SumTypeHandling = ..., fieldNameMapping: JsonMemberFormat = ..., allowExtraFields: Boolean = ..., sumTypeMapping: JsonMemberFormat = ..., explicitNulls: Boolean = ..., explicitEmptyCollections: ExplicitEmptyCollections = ..., enumValuesAsStrings: Boolean = ...): JsonCodecConfiguration

Attributes

Source
JsonCodecConfiguration.scala
def copy(sumTypeHandling: SumTypeHandling, fieldNameMapping: JsonMemberFormat, allowExtraFields: Boolean, sumTypeMapping: JsonMemberFormat, explicitNulls: Boolean, explicitEmptyCollections: ExplicitEmptyCollections): JsonCodecConfiguration

Attributes

Source
JsonCodecConfiguration.scala
def copy(sumTypeHandling: SumTypeHandling, fieldNameMapping: JsonMemberFormat, allowExtraFields: Boolean, sumTypeMapping: JsonMemberFormat, explicitNulls: Boolean): JsonCodecConfiguration

Attributes

Source
JsonCodecConfiguration.scala

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