Skip to content

Commit b1ae5fa

Browse files
committed
fix #73 as a regression to #22
1 parent 0a39346 commit b1ae5fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

loadjson.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
opt.arraytoken_=arraytoken;
115115
opt.arraytokenidx_=arraytokenidx;
116116
opt.simplifycell=jsonopt('SimplifyCell',1,opt);
117-
opt.simplifycellarray=jsonopt('SimplifyCellArray',0,opt);
117+
opt.simplifycellarray=jsonopt('SimplifyCellArray',opt.simplifycell,opt);
118118
opt.formatversion=jsonopt('FormatVersion',2,opt);
119119
opt.fastarrayparser=jsonopt('FastArrayParser',1,opt);
120120
opt.parsestringarray=jsonopt('ParseStringArray',0,opt);
@@ -281,7 +281,7 @@
281281
end
282282

283283
if(varargin{1}.simplifycell)
284-
if(iscell(object) && ~isempty(object) && isnumeric(object{1}))
284+
if(iscell(object) && ~isempty(object) && (isnumeric(object{1}) || isstruct(object{1})) )
285285
if(all(cellfun(@(e) isequal(size(object{1}), size(e)) , object(2:end))))
286286
try
287287
oldobj=object;

0 commit comments

Comments
 (0)