fun <T : Any> SerialModule.getContextualOrDefault(klass: KClass<T>): KSerializer<T>
Returns a serializer associated with klass, or a default one.
SerializationException
- if serializer can't be found.
fun <T : Any> SerialModule.getContextualOrDefault(value: T): KSerializer<T>
Returns a serializer associated with KClass of the given value, or a default one.