Handling custom serializer/deserializer for descendants of open generic types.