transient
zio.blocks.schema.Modifier.transient
Makes the JSON codec leave a field out when it encodes. The TOON and BSON codecs also read it; the Avro, MessagePack, Thrift, CSV, XML and YAML codecs ignore it. When the JSON codec decodes, it treats the field's key like an unknown key (skipped, or rejected when extra fields are rejected), and the field gets its default value.
The field needs a default value unless it is an Option or a collection; otherwise Schema.derived fails to compile.
Attributes
- Source
- Modifier.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Termtrait Modifiertrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
Members list
In this article