OPEN

Open polymorphic kind represents statically unknown type that is hidden behind a given base class or interface. PolymorphicSerializer can be used as an example of polymorphic serialization.

Due to security concerns and typical mistakes that arises from polymorphic serialization, by default kotlinx.serialization provides only bounded polymorphic serialization, forcing users to register all possible serializers for a given base class or interface.

To introspect descriptor of this kind (e.g. list possible subclasses), an instance of SerializersModule is required. See capturedKClass extension property for more details.

Functions

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String