monty icon indicating copy to clipboard operation
monty copied to clipboard

WIP Added support for tuples, namedtuples (both from collections and typing), sets, frozensets and OrderedDict's in MSONable, MontyEncoder and MontyDecoder

Open davidwaroquiers opened this issue 4 years ago • 0 comments

Summary

Solves #89

  • tuple's, collections.namedtuple's, typing.NamedTuple's, set's, frozenset's and collections.OrderedDict's are automatically serialized as special dictionaries, that allow to reconstruct the proper object upon deserialization.

TODO

Might want to add support for other objects, e.g. Data classes and possibly others. Not sure whether the last try-except in the default method of MontyEncoder is still necessary as the as_dict is now directly performed (recursively) at the beginning of the encode method of MontyEncoder.

davidwaroquiers avatar Jan 14 '20 13:01 davidwaroquiers