python加载json文件

主要是加载进来,之后就没难度了

import json

path = 'predict2.json'
file = open(path, "rb")
fileJson = json.load(file) # 剩下的就是解析了,都是列表和字典的操作
crop_cells = fileJson["crop_cells"]
... ...

  

原文地址:https://www.cnblogs.com/niulang/p/12980480.html