Commit 67a7e435 authored by Houtan Bastani's avatar Houtan Bastani

gui: pass JSON as string

parent 99060b0f
function read()
% function read()
function read(json)
% function read(json)
% Read JSON and run perfect foresight solver
%
% INPUTS
% none
% json [string] JSON string representing options to run perfect
% foresight solver
%
% OUTPUTS
% 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')
end
%loading JSON
jm = loadjson('perforin.JSON','SimplifyCell',0);
jm = loadjson(json,'SimplifyCell',0);
data2json=struct();
%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