Andrei Kulakov <andrei....@gmail.com> added the comment:

In general this sounds reasonable; - but a couple of thoughts / comments:

- If you have a dict with mixed numbers in str format and in number format 
(i.e. ints as numbers and ints as strings in your case), you are creating 
problems in many potential places. The core of the problem is logically 
inconsistent keys rather than the step of conversion to JSON. So the most 
useful place for warning would be when adding a new key, but that wouldn't be 
practical.

- Even if something is to be done at conversion to JSON, it's not clear if it 
should be a warning (would that be enough when the conversion is a logical 
bug?), or it should be some kind of strict=True mode that raises a ValueError?

----------
nosy: +andrei.avk

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45054>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to