Skip to content
Permalink
Browse files

avoid side effect of removing singletarray

  • Loading branch information...
fangq committed May 2, 2019
1 parent 8360fd1 commit 1b1be6595377b49089300df2c50dd6d746b7ba82
Showing with 2 additions and 2 deletions.
  1. +1 −1 savejson.m
  2. +1 −1 saveubjson.m
@@ -410,7 +410,7 @@
end
else
if(numel(item)==1 && jsonopt('SingletArray',0,varargin{:})==0 && level>0)
numtxt=regexprep(regexprep(matdata2json(item,level+1,varargin{:}),'^\[',''),']','');
numtxt=regexprep(regexprep(matdata2json(item,level+1,varargin{:}),'^\[',''),']$','');
else
numtxt=matdata2json(item,level+1,varargin{:});
end
@@ -318,7 +318,7 @@
txt=matdata2ubjson(item,level+1,varargin{:});
else
if(numel(item)==1 && jsonopt('SingletArray',0,varargin{:})==0)
numtxt=regexprep(regexprep(matdata2ubjson(item,level+1,varargin{:}),'^\[',''),']','');
numtxt=regexprep(regexprep(matdata2ubjson(item,level+1,varargin{:}),'^\[',''),']$','');
txt=[N_(checkname(name,varargin{:})) numtxt];
else
txt=[N_(checkname(name,varargin{:})),matdata2ubjson(item,level+1,varargin{:})];

0 comments on commit 1b1be65

Please sign in to comment.
You can’t perform that action at this time.