添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
# 将 JSON 对象类型转换为 Python 字典 user_dic = json.loads(json_str) print(user_dic['name']+"--"+str(user_dic['address'])) #print(user_dic['name']) #print(user_dic['address']) print('') address = user_dic['address'] json_str = json.dumps(address) user_dic = json.loads(json_str) print(user_dic['province']) print('') data = [{'name': 'test','age': 100,'vip': True,'address': {'province': 'Jiangsu', 'city': 'Changzhou'}}] print(data[0]) json_str = json.dumps(data[0]) # 将 JSON 对象类型转换为 Python 字典 user_dic = json.loads(json_str) print('') print(user_dic['name']+"--"+str(user_dic['address'])) #print(user_dic['address']) print('') address = user_dic['address'] json_str = json.dumps(address) user_dic = json.loads(json_str) print(user_dic['province'])