easyidp.jsonfile.read_json¶
- easyidp.jsonfile.read_json(json_path)¶
将 JSON 文件读取为 Python 字典。
- 参数:
json_path (str) -- JSON 文件的路径
- 返回类型:
dict
示例
数据准备:
>>> import easyidp as idp >>> test_data = idp.data.TestData()
Use this function:
>>> out = idp.jsonfile.read_json(test_data.json.for_read_json) >>> out {'test': {'rua': [[12, 34], [45, 56]]}, 'hua': [34, 34.567]}