A builder which registers all its content for polymorphic serialization in the scope of the base class. If baseSerializer is present, registers it as a serializer for baseClass (which will be used if base class is serializable). Subclasses and its serializers can be added with subclass builder function.
To obtain an instance of this builder, use SerializersModuleBuilder.polymorphic DSL function.
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
JsonBuilder.useArrayPolymorphism set to