I already have all this in Orange , which I'm in progress of adapting
to a package for Phobos.
This requires registering the subclass in some way. In my implementation
one needs to call:
For full example see .
The problem with the way your doing it though is that it requires that the
library doing the deserialization is fully aware of the semantics used in
the serialization implementation, rather than just the syntax and
semantics of the selected serialization format.