Files
3D_EDFM_SIM-X/gui_support/config/load_config_json.m
T
2026-03-16 16:57:25 +08:00

14 lines
327 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 = jsondecode(json_text);