enthought / apptools

Other
37 stars 24 forks source link

Support for serialization with jsonpickle #309

Open johannesloibl opened 2 years ago

johannesloibl commented 2 years ago

In my application i am serializing the state using jsonpickle. Therefor state_pickler.State needs two additional functions implemented to support this. Maybe you consider adding this to main.

    def __getstate__(self):
        return dict(self)

    def __setstate__(self, state):
        dict.__init__(self, **state)
        self.__dict__ = self