str_b='{"1":"tom","2":"tina"}' b=json.loads(str_b) print(type(b))
容易产生:
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2(char 1)
错误,主要是字典的字符串格式要按照以下格式写:
str_b='{"1":"tom","2":"tina"}'
str_b='{"1":"tom","2":"tina"}' b=json.loads(str_b) print(type(b))
容易产生:
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2(char 1)
错误,主要是字典的字符串格式要按照以下格式写:
str_b='{"1":"tom","2":"tina"}'