polymorphic

open override fun <Base : Any, Sub : Base> polymorphic(    baseClass: KClass<Base>,     actualClass: KClass<Sub>,     actualSerializer: KSerializer<Sub>)

Adds serializer associated with given actualClass in the scope of baseClass for polymorphic serialization. Throws SerializationException if a module already has serializer associated with a actualClass. To overwrite an already registered serializer, SerializersModule.overwriteWith can be used.