14 lines
327 B
Matlab
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);
|