[issue36841] Supporting customization of float encoding in JSON

Min RK report at bugs.python.org
Thu Sep 30 07:24:43 EDT 2021


Min RK <benjaminrk at gmail.com> added the comment:

We just ran into this in Jupyter where we've removed a pre-processing step for data structures passed to json.dumps, which took care of this, but was expensive https://github.com/jupyter/jupyter_client/pull/706

My expectation was that our `default` would be called for the unsupported value, but it isn't. I see the PR proposes a new option, but would it be sensible to use the already-existing `default` callback for this? It seems like what `default` is for.

----------

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


More information about the Python-bugs-list mailing list