Key
zio.blocks.schema.toon.DiscriminatorKind.Key
case object Key extends DiscriminatorKind
Represents a discriminator strategy where the subtype identifier is encoded as the key of a TOON record.
It is a default strategy for serializing and deserializing of all kinds of variants (sealed hierarchies, union types, etc.).
In this strategy, the serialized representation of the subtype wraps the encoded value in a nested record keyed by the subtype's discriminator, e.g., SubtypeIdentifier: followed by indented fields.
This approach enables subtype differentiation based solely on the key of the TOON record for the sealed hierarchy.
Attributes
- Source
- DiscriminatorKind.scala
- Graph
-
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait DiscriminatorKindclass Objecttrait Matchableclass Any
- Self type
-
Key.type
Members list
In this article