[issue32816] Python's json dumps/loads make integer keys of the dict str

2018-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See the documentation. This is documented behavior. The JSON format supports only string keys, and all keys are coerced to strings when serialized to JSON. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> close

[issue32816] Python's json dumps/loads make integer keys of the dict str

2018-02-10 Thread Korabelnikov Aleksandr via Python-bugs-list
New submission from Korabelnikov Aleksandr : when i serialize and deserialize python built-in structure I'm expect output same as input arr2 = [1,2,'3'] arr2_json = json.dumps(arr2) json.loads(arr2_json) Out[16]: [1, 2, '3'] BUT when I'm tring do it with dict I got str keys instead of integer