This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author solin
Recipients solin
Date 2018-02-10.15:59:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518278392.29.0.467229070634.issue32816@psf.upfronthosting.co.za>
In-reply-to
Content
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

dict1 = {0: 'object0', '1': 'object2'}
json1 = json.dumps(dict1)
json.loads(json1)
Out[6]: {'0': 'object0', '1': 'object2'}

Notice keys must be [0, '1'] but actually are ['0', '1']
History
Date User Action Args
2018-02-10 15:59:52solinsetrecipients: + solin
2018-02-10 15:59:52solinsetmessageid: <1518278392.29.0.467229070634.issue32816@psf.upfronthosting.co.za>
2018-02-10 15:59:52solinlinkissue32816 messages
2018-02-10 15:59:52solincreate