je_load_density.utils.json.json_file.json_file

Functions

read_action_json(json_file_path)

讀取 JSON 檔案並回傳內容 Read JSON file and return its content

write_action_json(json_save_path, action_json)

將資料寫入 JSON 檔案 Write data into JSON file

je_load_density.utils.json.json_file.json_file.read_action_json(json_file_path: str) dict | list

讀取 JSON 檔案並回傳內容 Read JSON file and return its content

Parameters:

json_file_path – JSON 檔案路徑 (path to JSON file)

Returns:

JSON 內容 (dict or list)

Raises:

LoadDensityTestJsonException – 當檔案不存在或無法讀取時 (if file not found or cannot be read)

je_load_density.utils.json.json_file.json_file.write_action_json(json_save_path: str, action_json: dict | list) None

將資料寫入 JSON 檔案 Write data into JSON file

Parameters:
  • json_save_path – JSON 檔案儲存路徑 (path to save JSON file)

  • action_json – 要寫入的資料 (data to write, dict or list)

Raises:

LoadDensityTestJsonException – 當檔案無法寫入時 (if file cannot be saved)