python里面字符串转换为字典,高手进,求助
如果字符串能够修改为下面这种,就可以直接json处理:
import jsons = '''{"id1": 1, "name1": "张三", "description1": "mmmmmm", "id2": 2, "name2": "李四", "description2": "NNNNNNN", "id3": 3, "name3": "王五", "description3": "TTTTT"}'''
print json.loads(s,encoding='UTF-8')