9 Aug
2019
9 Aug
'19
4:56 a.m.
On the second though though, what you propose should work right, if: 1) json.dumps will be extended to accept `dump_float` keyword argument, which would accept a custom class (for example decimal.Decimal, but could the same one which was specified with `parse_float`). 2) Then the serializer when seeing this particular type will do the string converson of the object, do the check for valid float as you suggest (as it is supposed to be dumping float after all) and then dumps the string into the output _but without the double quotes_.