我正在尝试从获取的 JSON 中打印数据,但是数据具有 unicode 解码的数据。如何对其进行编码(参见示例)以正确显示。我对 python 很陌生,无法让它工作,我在命令行终端上使用 Windows 7、python 2.7。谢谢!
示例:结果>>标题:
'R\u00f6yksopp - 49 Percent' 必须将其打印为 'Röyksopp - 49 Percent'
"title": "R\u00f6yksopp - 49 Percent",
JSON:
"results": [{
"style": ["House", "Electro", "Synth-pop"],
"thumb": "http://api.discogs.com/image/R-90-530519-1236701656.jpeg",
"format": ["CD", "Maxi-Single"],
"country": "Europe",
"barcode": ["5 028589 023420", "BEL/BIEM", "LC 3098"],
"uri": "/R%C3%B6yksopp-49-Percent/master/30161",
"label": ["Virgin", "Labels", "Wall Of Sound"],
"catno": "0946 3378752 0",
"year": "2005",
"genre": ["Electronic"],
"title": "R\u00f6yksopp - 49 Percent",
"resource_url": "http://api.discogs.com/masters/30161",
"type": "master",
"id": 30161
}