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 david.byrne222
Recipients david.byrne222
Date 2020-08-17.17:42:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597686141.71.0.298355570835.issue41569@roundup.psfhosted.org>
In-reply-to
Content
Sub-classing and overriding json.JSONEncoder.default allows users to create custom serialisation for objects that can’t otherwise be serialized. However, this method is only called for dictionary values such that dictionary supported keys (i.e. hashable types) can not be fully utilized. Calling .default on keys as well as values allows users to to fully utilize json for all dict supported types. 

See https://stackoverflow.com/questions/63393059/json-dump-not-calling-default-or-cls for example
History
Date User Action Args
2020-08-17 17:42:21david.byrne222setrecipients: + david.byrne222
2020-08-17 17:42:21david.byrne222setmessageid: <1597686141.71.0.298355570835.issue41569@roundup.psfhosted.org>
2020-08-17 17:42:21david.byrne222linkissue41569 messages
2020-08-17 17:42:21david.byrne222create