[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2021-07-04 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2021-06-24 Thread Irit Katriel
Irit Katriel added the comment: This is documented, was added here: https://github.com/python/cpython/commit/f2123d2db54d661a016f02c5a1a02484d6d79e0d If nobody objects I will close as won't fix. -- nosy: +iritkatriel resolution: -> wont fix status: open -> pending _

[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2016-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think etrepum's comment on Aug 27, 2013 display's sound reasoning: ''' I expect that this error checking feature would be expensive to implement (both in runtime cost and lines of code). I think the most sensible thing to do would be to just mention this i

[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2016-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also https://github.com/simplejson/simplejson/issues/77 . -- nosy: +serhiy.storchaka versions: -Python 3.4 ___ Python tracker ___ ___

[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2016-04-09 Thread anton-ryzhov
New submission from anton-ryzhov: JSON doesn't allow to have non-sting keys in objects, so json.dumps converts its to string. But if several keys has one string representation — we'll get damaged result as follows: >>> import json >>> json.dumps({1: 2, "1": "2"}) '{"1": 2, "1": "2"}' I think