Python处理json文件
需求:从json文件中读取数据。
查阅资料后是使用这样的方法:
with open(file_path, "r") as f:
file_data = json.load(f)
原来也使用过json模块,但是对他的使用还不是很了解,说到底,还是要知根知底。
需求:从json文件中读取数据。
查阅资料后是使用这样的方法:
with open(file_path, "r") as f:
file_data = json.load(f)
原来也使用过json模块,但是对他的使用还不是很了解,说到底,还是要知根知底。