python 提取key 为中文的json 串方法 示例: # -*- coding:utf-8 -*- import json strtest = {"中故宫":"好地方","天涯":"北京"} print strtest #####{'\xe4\xb8\xad\xe6\x95\x85\xe5\xae\xab': '\xe5\xa5\xbd\xe5\x9c\xb0\xe6\x96\xb9', '\xe5\xa4\xa9\xe6\xb6\xaf': '\xe5\x8c\x97\xe4\xba\xac'} strtestObj = json.loads(json.dumps(strtest)) print ">>strtestObj ",strtestObj ###{u'\u5929\u6daf': u'\u5317\u4eac', u'\u4e2d\u6545\u5bab': u'\u597d\u5730\u65b9'} print "test type " , type(strtestObj) ### print "trans>>> ","中故宫".decode("utf-8") ###中故宫 print ">>>>>strtestObj ",strtestObj["中故宫".decode("utf-8")] ###好地方 以上这篇python 提取key 为中文的json 串方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持中文源码网。