[issue21543] json library fails to serialize objects such as datetime

Dann Ke report at bugs.python.org
Tue May 20 19:11:21 CEST 2014


Dann Ke added the comment:

I was reading the older 2.7 docs and it didn't click that default() was
what I wanted. Thank you for clarifying.

On Tue, May 20, 2014 at 10:09 AM, akira <report at bugs.python.org> wrote:

>
> akira added the comment:
>
> json module already allows you to customize the serialization: see
> *default* parameter for json.dumps [1]
>
> [1] https://docs.python.org/3/library/json.html#json.dump
>
> ----------
> nosy: +akira
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue21543>
> _______________________________________
>

----------

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


More information about the Python-bugs-list mailing list