getPolymorphic

abstract fun <T : Any> getPolymorphic(baseClass: KClass<in T>, value: T): SerializationStrategy<T>?

Returns a polymorphic serializer registered for a class of the given value in the scope of baseClass.


abstract fun <T : Any> getPolymorphic(baseClass: KClass<in T>, serializedClassName: String?): DeserializationStrategy<out T>?

Returns a polymorphic deserializer registered for a serializedClassName in the scope of baseClass or default value constructed from serializedClassName if a default serializer provider was registered.