Skip to content

Commit a6cd612

Browse files
author
fangq
committed
parse logical in loadjson
git-svn-id: http://svn.code.sf.net/p/iso2mesh/code/trunk/jsonlab@485 786e58fb-9377-0410-9ff7-e4ac0ac0635c
1 parent 3f6bfed commit a6cd612

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

examples/demo_jsonlab_basic.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
'misfits',[Inf,NaN],'embedded',struct('left',true,'right',false))
129129
savejson('astruct',data2json,struct('ParseLogical',1))
130130
json2data=loadjson(ans)
131+
class(json2data.astruct.embedded.left)
131132

132133
fprintf(1,'\n%%=================================================\n')
133134
fprintf(1,'%% a structure array\n')

examples/jsonlab_basictest.matlab

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,11 @@ json2data =
462462

463463
astruct: [1x1 struct]
464464

465+
>>
466+
ans =
467+
468+
logical
469+
465470
>> >>
466471
%=================================================
467472
>> % a structure array

loadjson.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ function parse_char(c)
424424

425425
function val = parse_value(varargin)
426426
global pos inStr len
427-
true = 1; false = 0;
428427

429428
pbar=jsonopt('progressbar_',-1,varargin{:});
430429
if(pbar>0)

0 commit comments

Comments
 (0)