Skip to content

Commit

Permalink
fix #73 as a regression to #22
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 23, 2021
1 parent 0a39346 commit b1ae5fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loadjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
opt.arraytoken_=arraytoken;
opt.arraytokenidx_=arraytokenidx;
opt.simplifycell=jsonopt('SimplifyCell',1,opt);
opt.simplifycellarray=jsonopt('SimplifyCellArray',0,opt);
opt.simplifycellarray=jsonopt('SimplifyCellArray',opt.simplifycell,opt);
opt.formatversion=jsonopt('FormatVersion',2,opt);
opt.fastarrayparser=jsonopt('FastArrayParser',1,opt);
opt.parsestringarray=jsonopt('ParseStringArray',0,opt);
Expand Down Expand Up @@ -281,7 +281,7 @@
end

if(varargin{1}.simplifycell)
if(iscell(object) && ~isempty(object) && isnumeric(object{1}))
if(iscell(object) && ~isempty(object) && (isnumeric(object{1}) || isstruct(object{1})) )
if(all(cellfun(@(e) isequal(size(object{1}), size(e)) , object(2:end))))
try
oldobj=object;
Expand Down

0 comments on commit b1ae5fa

Please sign in to comment.