你好!这里是一个使用 Python 写的类,可以读取本地 JSON 文件并返回 JSON 对象,同时也提供了一个方法来查询 JSON 对象的值。
import json
class JSONReader:
def __init__(self, file_path: str):
self.file_path = file_path
self.json_obj = None
def read_json(self):
with open(self.file_path, 'r') as