polymorphic

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

Accept a serializer, associated with actualClass for polymorphic serialization.