from typing import Type, TypeVar
T = TypeVar('T')
[docs]
class DeserializationStrategy(object):
[docs]
def can_handle_deserialization(self, declared_type: type) -> bool:
raise NotImplementedError
[docs]
def deserialize(self, obj, declared_type: Type[T]) -> T:
raise NotImplementedError