serializerFor

fun serializerFor(type: KType): KSerializer<Any?>(source)

The serializer for type, where Any (as in Map<String, Any?>) stands for the plain value itself, as Object does for the Android mapper: it is decoded as is and encoded by its runtime type. The product's own value types are passed through the same way, and the type arguments of a generic class are resolved by this rule too. So is a type without a serializer of its own, such as the Comparable a map of mixed values infers, unless it is the base of a polymorphic hierarchy registered in the serializersModule.