Skip to content

Commit

Permalink
fix #31, throw an error when : array construct is used
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jul 12, 2018
1 parent 956e000 commit f16cc57
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loadjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
if(isoct && regexp(arraystr,'"','once'))
error('Octave eval can produce empty cells for JSON-like input');
end
if(regexp(arraystr,':','once'))
error('One can not use MATLAB-like ":" construct inside a JSON array');
end
object=eval(arraystr);
pos=endpos;
catch
Expand Down

0 comments on commit f16cc57

Please sign in to comment.