使用python 自带的函数可以将json 格式的数据(也就是字符串)转换为原始格式的数据, 当使用json.loads()无法将json格式的数据转换为原始数据(存在多层各种格式类型数据的嵌套), 往往可以使用eval()进行解决

json_str = "[{"name":"lowman", "age":"12"}]'

item = eval(json_str)

相关文章:

  • 2021-04-09
  • 2022-12-23
  • 2022-01-16
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2022-01-21
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案