{
"Sponge": {
"orientation": "Straight",
"gender": "Woman",
"age": 23,
"rel_status": "Single",
"summary": " Bonjour! Je m'appelle Jacqueline!, Enjoy cooking, reading and traveling!, Love animals, languages and nature :-) ",
"location": "Kao-hsiung-k’a",
"id": "6693397339871"
}
}
我上面有这个json,除了里面有一些特殊字符外,我正试着去读它。例如位置中的“'”。这提高当我尝试读取JSON一些错误:UnicodeDecodeError同时用python3.5解码json时
UnicodeEncodeError: 'charmap' codec can't encode characters in position 27-28: character maps to <undefined>
我使用python 3.5和我做了下面的代码:
with open('test.json') as json_data:
users = json.load(json_data)
print users
问题标题说。实际报告的错误是Unicode ** En ** codeError –