the type to register, must be a class
class Base {} class Sub : Base {} Serializer.register!(Sub); auto archive = new XmlArchive!(); auto serializer = new Serializer(archive); Base b = new Sub; serializer.serialize(b);
registerSerializer registerDeserializer
Registers the given type for (de)serialization.
This method is used for register classes that will be (de)serialized through base class references, no other types need to be registered. If the the user tries to (de)serialize an instance through a base class reference which runtime type is not registered an exception will be thrown.