[issue16535] json encoder unable to handle decimal

Raymond Hettinger report at bugs.python.org
Mon Dec 21 16:50:19 EST 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> I wonder if adding something similar to what `simplejson` uses 
> (i.e. explicitly specifying in `json.dump(s)` how to
> serialize `decimal.Decimal`) could be acceptable.

+1 for this approach.  For financial applications, we need the recommended solution to be simple.

----------
nosy: +bob.ippolito
versions: +Python 3.10 -Python 3.5

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


More information about the Python-bugs-list mailing list