Skip to content

Commit

Permalink
update help info,add the new flags
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 11, 2019
1 parent 9bfae2a commit f28f010
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
5 changes: 5 additions & 0 deletions loadjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
% opt.ParseStringArray [0|1]: if set to 0, loadjson converts "string arrays"
% (introduced in MATLAB R2016b) to char arrays; if set to 1,
% loadjson skips this conversion.
% opt.FormatVersion [2|float]: set the JSONLab format version; since
% v2.0, JSONLab uses JData specification Draft 1
% for output format, it is incompatible with all
% previous releases; if old output is desired,
% please set FormatVersion to 1.9 or earlier.
%
% output:
% dat: a cell array, where {...} blocks are converted into cell arrays,
Expand Down
5 changes: 5 additions & 0 deletions loadubjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
% the "name" tag is treated as a string. To load
% these UBJSON data, you need to manually set this
% flag to 1.
% opt.FormatVersion [2|float]: set the JSONLab format version; since
% v2.0, JSONLab uses JData specification Draft 1
% for output format, it is incompatible with all
% previous releases; if old output is desired,
% please set FormatVersion to 1.9 or earlier.
%
% output:
% dat: a cell array, where {...} blocks are converted into cell arrays,
Expand Down
8 changes: 7 additions & 1 deletion savejson.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
% compressed binary array data.
% opt.CompressArraySize [100|int]: only to compress an array if the total
% element count is larger than this number.
% opt.FormatVersion [2|float]: set the JSONLab output version; since
% v2.0, JSONLab uses JData specification Draft 1
% for output format, it is incompatible with all
% previous releases; if old output is desired,
% please set FormatVersion to 1.9 or earlier.
%
% opt can be replaced by a list of ('param',value) pairs. The param
% string is equivallent to a field in opt and is case sensitive.
% output:
Expand Down Expand Up @@ -214,7 +220,7 @@
elseif(isa(item,'categorical'))
txt=cell2json(name,cellstr(item),level,varargin{:});
elseif(isobject(item))
if(~exist('OCTAVE_VERSION','builtin') && exist('istable') && istable(item))
if(~jsonopt('IsOctave',0,varargin{:}) && exist('istable') && istable(item))
txt=matlabtable2json(name,item,level,varargin{:});
else
txt=matlabobject2json(name,item,level,varargin{:});
Expand Down
6 changes: 6 additions & 0 deletions saveubjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
% element count is larger than this number.
% opt.MessagePack [0|1]: output MessagePack (https://msgpack.org/)
% binary stream instead of UBJSON
% opt.FormatVersion [2|float]: set the JSONLab output version; since
% v2.0, JSONLab uses JData specification Draft 1
% for output format, it is incompatible with all
% previous releases; if old output is desired,
% please set FormatVersion to 1.9 or earlier.
% opt.Debug [0|1]: output binary numbers in <%g> format for debugging
%
% opt can be replaced by a list of ('param',value) pairs. The param
% string is equivallent to a field in opt and is case sensitive.
Expand Down

0 comments on commit f28f010

Please sign in to comment.