transient

zio.blocks.schema.Modifier.transient
case class transient() extends Term

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 Serializable
trait Product
trait Equals
trait Term
trait Modifier
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

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
def productIterator: Iterator[Any]

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