Dumping and loading a dict using None as key results in a dict with "null" as the key.
The values ββare not affected, but things get even worse if there is actually a "null" string key.
What am I doing wrong here? Why can't I serialize / deserialize a dict with the No keys?
Example
>>> json.loads(json.dumps({'123':None, None:'What happened to None?'})) {u'123': None, u'null': u'What happened to None?'} >>> json.loads(json.dumps({'123':None, None:'What happened to None?', 'null': 'boom'})) {u'123': None, u'null': u'boom'}
json python dictionary
safl
source share