[issue23123] Only READ support for Decimal in json
Anders Rundgren
report at bugs.python.org
Tue Dec 30 06:43:19 CET 2014
Anders Rundgren added the comment:
Ethan Furman added the comment:
> I am not a regular json user, but my impression is the format is
> pretty basic, and we would be overloading it to try and keep numbers
> with three decimal places as Decimal, and anything else as float.
> Isn't json's main purpose to support data exchange between different
> programs of different languages? Not between different Python
> programs?
Right, unfortunately the need to support non-native data types like big decimals, dates and blobs have lead to a certain amount of confusion and innovation among JSON tool designers.
I (FWIW) do actually NOT want to extend a single bit from the RFC, I just want serializing to be "non-invasive". If the parse_float option stays "as is" it seems that both the people who want big (non-standard) numbers and I who want somewhat non-standard serialization would be happy. I.e. a documentation snippet would be sufficient as far as I can tell.
Serialization order of objects is apparently a hot topic
https://code.google.com/p/v8/issues/detail?id=164
but Python has no problem with that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23123>
_______________________________________
More information about the Python-bugs-list
mailing list