Message311951
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'] |
|
Date |
User |
Action |
Args |
2018-02-10 15:59:52 | solin | set | recipients:
+ solin |
2018-02-10 15:59:52 | solin | set | messageid: <1518278392.29.0.467229070634.issue32816@psf.upfronthosting.co.za> |
2018-02-10 15:59:52 | solin | link | issue32816 messages |
2018-02-10 15:59:52 | solin | create | |
|