[issue18264] enum.IntEnum is not compatible with JSON serialisation

Antoine Pitrou report at bugs.python.org
Wed Jun 19 16:23:12 CEST 2013


Antoine Pitrou added the comment:

> Serialization isn't the only issue - you have to know how to
> deserialize as well.

I think this is pretty much besides the point. IntEnums are meant to be substitutible with plain ints, so you can deserialize as a plain int.

Moreoven, JSON doesn't fill the same use cases as pickle: it is meant to communicate with services written in any languages, and those services won't have the same enum mnemonics as your Python library.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18264>
_______________________________________


More information about the Python-bugs-list mailing list