gui: pass JSON as string

parent 99060b0f
function read()
% function read()
function read(json)
% function read(json)
% Read JSON and run perfect foresight solver
% none
% json [string] JSON string representing options to run perfect
% foresight solver
% none
......@@ -30,8 +31,12 @@ function read()
global M_ options_ oo_ ys0_ ex0_
if nargin ~= 1 || ~ischar(json)
error('function takes one string input argument')
%loading JSON
jm = loadjson('perforin.JSON','SimplifyCell',0);
jm = loadjson(json,'SimplifyCell',0);
%We test if jsonload loads string or char
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment