New submission from Vitaly Belman:

Possibly related to: http://bugs.python.org/issue18264


The following code:

>>> import IntEnum from enum
>>> from enum import IntEnum
>>> class a(IntEnum): a=0
>>> json.loads(json.dumps({"x": a.a}))

Produces:

ValueError: No JSON object could be decoded

Which makes sense because the json dumps function produces is: {"x": a.a}

----------
messages: 251945
nosy: Vitaly Belman
priority: normal
severity: normal
status: open
title: Incorrect enum behavior during json.dumps serialization
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25281>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to