对于集合的json字符串
json_string = json.dumps([ob.__dict__ for ob in list_obj]) 字符串转json a = "{'name': 'John', 'age': 25, 'id': 1}"bb = json.loads(a)print(type(bb))print(bb)# 输出结果<class 'dict'>{'name': 'John', 'age': 25, 'id': 1}
对于集合的json字符串
json_string = json.dumps([ob.__dict__ for ob in list_obj]) 字符串转json a = "{'name': 'John', 'age': 25, 'id': 1}"bb = json.loads(a)print(type(bb))print(bb)# 输出结果<class 'dict'>{'name': 'John', 'age': 25, 'id': 1}
版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。