discriminator
zio.blocks.schema.Modifier.discriminator
case class discriminator(name: String) extends Reflect
Makes the JSON codec of a variant write the case name in the field name of the case's object, as in {"type":"Hardcover"}, instead of wrapping the case in an object keyed by its name. It takes precedence over the discriminator setting of the deriver.
Attributes
- Source
- Modifier.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Reflecttrait Modifiertrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
Members list
In this article