fun defaultDeserializer(defaultDeserializerProvider: (className: String?) -> DeserializationStrategy<out Base>?)

Adds a default serializers provider associated with the given baseClass to the resulting module. defaultDeserializerProvider is invoked when no polymorphic serializers associated with the className were found. className could be null for formats that support nullable class discriminators (currently only Json with JsonBuilder.useArrayPolymorphism set to false)

defaultDeserializerProvider can be stateful and lookup a serializer for the missing type dynamically.

Typically, if the class is not registered in advance, it is not possible to know the structure of the unknown type and have a precise serializer, so the default serializer has limited capabilities. To have a structural access to the unknown data, it is recommended to use JsonTransformingSerializer or JsonContentPolymorphicSerializer classes.

Default deserializers provider affects only deserialization process.