Implemented and tested polymorphic de-serialization.