• jsonfile

这是一个用于简单json文件操作的包。主要用于从python字典对象读取和写入json文件。

它可以被视为 easyidp.ROI 类的子模块。

函数

小心

The easyidp.ROI class is an advanced wrapper around the following functions, which is generally sufficient for most simple application cases, please don't use the following functions unless you really need to.

read_json(json_path)

将 JSON 文件读取为 Python 字典。

read_geojson(geojson_path[, name_field, ...])

将 geojson 文件读取为 Python 字典

show_geojson_fields(geojson_path)

显示 geojson 属性数据,以便更好地设置 read_geojsonname_field

dict2json(data_dict, json_path[, indent, ...])

将字典对象保存为相同结构的 JSON 文件

write_json(data_dict, json_path[, indent, ...])

将字典保存为相同结构的 JSON 文件,是 dict2json() 的函数包装器

save_json(data_dict, json_path[, indent, ...])

将字典保存为相同结构的 JSON 文件,是 dict2json() 的函数包装器