[issue24641] Log type of unserializable value when raising JSON TypeError

Serhiy Storchaka report at bugs.python.org
Fri Nov 10 14:41:51 EST 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This issue was partially fixed in issue26623. The error message for unsupported types now is `"Object of type '%s' is not JSON serializable" % o.__class__.__name__`.

But this change is not complete. The error message for non-string keys still contains the repr of a key. And the example for default() in the module docstring contains the repr of an object.

----------
assignee:  -> serhiy.storchaka
stage: test needed -> 
versions: +Python 3.7 -Python 2.7, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24641>
_______________________________________


More information about the Python-bugs-list mailing list