ClassDiscriminatorMode
Defines which classes and objects should have their serial name included in the json as so-called class discriminator.
Class discriminator is a JSON field added by kotlinx.serialization that has JsonBuilder.classDiscriminator as a key (type
by default), and class' serial name as a value (fully qualified name by default, can be changed with SerialName annotation).
Class discriminator is important for serializing and deserializing polymorphic class hierarchies. Default ClassDiscriminatorMode.POLYMORPHIC mode adds discriminator only to polymorphic classes. This behavior can be changed to match various JSON schemas.
See also
Entries
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.