This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients ezio.melotti, rhettinger, xsmyqf, xtreak
Date 2020-05-02.04:56:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588395393.17.0.0547213182078.issue40475@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/library/json.html#json.JSONEncoder

> To extend this to recognize other objects, subclass and implement a default() method with another method that returns a serializable object for o if possible, otherwise it should call the superclass implementation (to raise TypeError).

default is called only when the object cannot be serialized by default. In this case dict is serializable and default won't be called.
History
Date User Action Args
2020-05-02 04:56:33xtreaksetrecipients: + xtreak, rhettinger, ezio.melotti, xsmyqf
2020-05-02 04:56:33xtreaksetmessageid: <1588395393.17.0.0547213182078.issue40475@roundup.psfhosted.org>
2020-05-02 04:56:33xtreaklinkissue40475 messages
2020-05-02 04:56:33xtreakcreate