Skip to content

Commit f16cc57

Browse files
committed
fix #31, throw an error when : array construct is used
1 parent 956e000 commit f16cc57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

loadjson.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@
215215
if(isoct && regexp(arraystr,'"','once'))
216216
error('Octave eval can produce empty cells for JSON-like input');
217217
end
218+
if(regexp(arraystr,':','once'))
219+
error('One can not use MATLAB-like ":" construct inside a JSON array');
220+
end
218221
object=eval(arraystr);
219222
pos=endpos;
220223
catch

0 commit comments

Comments
 (0)