Message349250
It looks like I am resurrecting an old item, but I have been just hit by this and was directed to this issue (https://mail.python.org/archives/list/python-ideas@python.org/thread/WT6Z6YJDEZXKQ6OQLGAPB3OZ4OHCTPDU/)
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.
Or, the other idea would be to expose a method in JSONEncoder, which would accept "raw" textual output, i.e. string (or even `bytes`) and would encode it without adding additional characters to it. (as explained in my posts in the other threads).
As it seems right now, there is no way to serialize `decimal.Decimal` the same way it is deserialized, i.e. while preserving the (arbitrary) precision. |
|
Date |
User |
Action |
Args |
2019-08-08 19:46:27 | risa2000 | set | recipients:
+ risa2000, rhettinger, jcea, mark.dickinson, pitrou, christian.heimes, ezio.melotti, eric.araujo, Arfrever, cvrebert, serhiy.storchaka, ralhei, mjensen |
2019-08-08 19:46:27 | risa2000 | set | messageid: <1565293587.54.0.728245279323.issue16535@roundup.psfhosted.org> |
2019-08-08 19:46:27 | risa2000 | link | issue16535 messages |
2019-08-08 19:46:27 | risa2000 | create | |
|