Christopher Barker wrote:
I don't think anyone else has come up with, any examples other than Decimal that require this "raw" encoding.

It's possible that someone could have their own custom numeric
type that they want to encode as a JSON number. But if the base
code is enhanced to understand Decimal, that could be achieved
using the existing mechanism for returning an alternative
object to be encoded -- just convert your type to an equivalent
Decimal and return that.

--
Greg
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/M2LT53UY5ZWM7QQGD5XCRWRCV3KCL5X7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to