File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 3131% the "name" tag is treated as a string. To load
3232% these UBJSON data, you need to manually set this
3333% flag to 1.
34- % opt.Compression 'zlib' or 'gzip': specify array compression
35- % method; currently only support 'gzip' or 'zlib'.
36- % opt.CompressArraySize [0|int]: only compress arrays with a total
37- % element count larger than this number.
3834%
3935% output:
4036% dat: a cell array, where {...} blocks are converted into cell arrays,
Original file line number Diff line number Diff line change 6969% opt.Compact [0|1]: 1- out compact JSON format (remove all newlines and tabs)
7070% opt.Compression 'zlib' or 'gzip': specify array compression
7171% method; currently only support 'gzip' or 'zlib'.
72- % opt.CompressArraySize [0 |int]: only compress arrays with a total
72+ % opt.CompressArraySize [100 |int]: only compress arrays with a total
7373% element count larger than this number.
7474% opt can be replaced by a list of ('param',value) pairs. The param
7575% string is equivallent to a field in opt and is case sensitive.
389389sep= ws .sep ;
390390
391391dozip= jsonopt(' Compression' ,' ' ,varargin{: });
392- zipsize= jsonopt(' CompressArraySize' ,0 ,varargin{: });
392+ zipsize= jsonopt(' CompressArraySize' ,100 ,varargin{: });
393393
394394if (length(size(item ))>2 || issparse(item ) || ~isreal(item ) || ...
395395 (isempty(item ) && any(size(item ))) || jsonopt(' ArrayToStruct' ,0 ,varargin{: }) || (~isempty(dozip ) && numel(item )>zipsize ))
Original file line number Diff line number Diff line change 5555% wrapped inside a function call as 'foo(...);'
5656% opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson
5757% back to the string form
58+ % opt.Compression 'zlib' or 'gzip': specify array compression
59+ % method; currently only support 'gzip' or 'zlib'.
60+ % opt.CompressArraySize [100|int]: only compress arrays with a total
61+ % element count larger than this number.
5862%
5963% opt can be replaced by a list of ('param',value) pairs. The param
6064% string is equivallent to a field in opt and is case sensitive.
294298end
295299
296300dozip= jsonopt(' Compression' ,' ' ,varargin{: });
297- zipsize= jsonopt(' CompressArraySize' ,0 ,varargin{: });
301+ zipsize= jsonopt(' CompressArraySize' ,100 ,varargin{: });
298302
299303if (length(size(item ))>2 || issparse(item ) || ~isreal(item ) || ...
300304 (isempty(item ) && any(size(item ))) || jsonopt(' ArrayToStruct' ,0 ,varargin{: }) || (~isempty(dozip ) && numel(item )>zipsize ))
You can’t perform that action at this time.
0 commit comments