Files
3D_EDFM_SIM-X/gui_support/config/load_config_json.m
T
2026-04-01 18:58:03 +08:00

14 lines
345 B
Matlab

function config = load_config_json(file_path)
%LOAD_CONFIG_JSON Load a config struct from a JSON file.
arguments
file_path (1,:) char
end
if ~exist(file_path, 'file')
error('load_config_json:FileNotFound', 'Config file not found: %s', file_path);
end
json_text = fileread(file_path);
config = normalize_config(jsondecode(json_text));