discriminatorName

zio.schema.annotation.discriminatorName
final case class discriminatorName(tag: String) extends StaticAnnotation

Annotation used to specify the name of a field that will be used to contain the id which identifies which term in an enum is being serialized / deserialized.

For example, if you set @discriminatorName("type"), then a field called "type" will be used to store the identity of the case of the enum that is being serialized / deserialized.

Value parameters

tag

the name of the field that will be used to store the identity of the case of the enum

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product