diff --git a/monkey/common/utils/IJSONSerializable.py b/monkey/common/utils/IJSONSerializable.py new file mode 100644 index 000000000..39eefbf90 --- /dev/null +++ b/monkey/common/utils/IJSONSerializable.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod + + +class IJSONSerializable(ABC): + @classmethod + @abstractmethod + def from_json(cls, json_string: str) -> IJSONSerializable: + pass + + @classmethod + @abstractmethod + def to_json(cls, class_object: IJSONSerializable) -> str: + pass