Assume there is a string like '{"a": None}'
. How to let Python know the existence of None
?
This is the error I have been receiving:
JSONDecodeError: Expecting value: line 1 column 7 (char 6)
Assume there is a string like '{"a": None}'
. How to let Python know the existence of None
?
This is the error I have been receiving:
JSONDecodeError: Expecting value: line 1 column 7 (char 6)
I'm not sure what you mean exactly by "letting python know of the existence of None," but you can easily convert the string to a dictionary by using the eval function like so:
json_entry = eval('{"a": None}')
print(json_entry["a"])
Output:
None