Skip to content

Commit

Permalink
fix containers.Map indentiation bug with a single element
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 8, 2023
1 parent 747c99b commit 837c8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions savejson.m
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@

for i = 1:dim(1)
if (isempty(names{i}))
txt{end + 1} = obj2json('x0x0_', val{i}, level + (dim(1) > 1), varargin{:});
txt{end + 1} = obj2json('x0x0_', val{i}, level + 1, varargin{:});
else
txt{end + 1} = obj2json(names{i}, val{i}, level + (dim(1) > 1), varargin{:});
txt{end + 1} = obj2json(names{i}, val{i}, level + 1, varargin{:});
end
if (i < length(names))
txt{end + 1} = ',';
Expand Down

0 comments on commit 837c8b5

Please sign in to comment.