getContextual

abstract fun <T : Any> getContextual(kClass: KClass<T>, typeArgumentsSerializers: List<KSerializer<*>> = emptyList()): KSerializer<T>?(source)

Returns a contextual serializer associated with a given kClass. If given class has generic parameters and module has provider for kClass, typeArgumentsSerializers are used to create serializer. This method is used in context-sensitive operations on a property marked with Contextual by a ContextualSerializer.

See also