diff --git a/ChangeLog.txt b/ChangeLog.txt index 5e0cb14deeb50bff1b588068ccd77d063c7619b6..2c6290dee7052fe55e2496c58046cd3fb9a9e4db 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,13 @@ JSONlab ChangeLog (key features marked by *): +== JSONlab 1.0.0-RC1 (codename: Optimus - RC1), FangQ <fangq (at) nmr.mgh.harvard.edu> == + + 2014/09/17 fix several compatibility issues when running on octave versions 3.2-3.8 + 2014/09/17 support 2D cell and struct arrays in both savejson and saveubjson + 2014/08/04 escape special characters in a JSON string + 2014/02/16 fix a bug when saving ubjson files + == JSONlab 0.9.9 (codename: Optimus - beta), FangQ <fangq (at) nmr.mgh.harvard.edu> == 2014/01/22 use binary read and write in saveubjson and loadubjson diff --git a/README.txt b/README.txt index 5dcacf40b369e007563af5437bf4dc3cfcb7299f..cdf72b52617b8d1fdc1e9ceb76cf540d3fdd0b2d 100644 --- a/README.txt +++ b/README.txt @@ -93,7 +93,7 @@ JSON. The detailed help info for the four functions can be found below: http://www.mathworks.com/matlabcentral/fileexchange/20565 date: 2008/07/03 - $Id: loadjson.m 394 2012-12-18 17:58:11Z fangq $ + $Id: loadjson.m 437 2014-09-15 18:59:36Z fangq $ input: fname: input file name, if fname contains "{}" or "[]", fname @@ -121,7 +121,7 @@ JSON. The detailed help info for the four functions can be found below: author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu) created on 2011/09/09 - $Id: savejson.m 394 2012-12-18 17:58:11Z fangq $ + $Id: savejson.m 439 2014-09-17 05:31:08Z fangq $ input: rootname: name of the root-object, if set to '', will use variable name @@ -169,6 +169,7 @@ JSON. The detailed help info for the four functions can be found below: wrapped inside a function call as 'foo(...);' opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson back to the string form + opt.SaveBinary [0|1]: 1 - save the JSON file in binary mode; 0 - text mode. opt can be replaced by a list of ('param',value) pairs. The param string is equivallent to a field in opt. output: @@ -193,7 +194,7 @@ JSON. The detailed help info for the four functions can be found below: authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu) date: 2013/08/01 - $Id: loadubjson.m 410 2013-08-24 03:33:18Z fangq $ + $Id: loadubjson.m 436 2014-08-05 20:51:40Z fangq $ input: fname: input file name, if fname contains "{}" or "[]", fname @@ -221,7 +222,7 @@ JSON. The detailed help info for the four functions can be found below: author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu) created on 2013/08/17 - $Id: saveubjson.m 410 2013-08-24 03:33:18Z fangq $ + $Id: saveubjson.m 439 2014-09-17 05:31:08Z fangq $ input: rootname: name of the root-object, if set to '', will use variable name @@ -268,7 +269,7 @@ JSON. The detailed help info for the four functions can be found below: a=struct('node',[1 9 10; 2 1 1.2], 'elem',[9 1;1 2;2 3],... 'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ'); saveubjson('mesh',a) - saveubjson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g') + saveubjson('mesh',a,'meshdata.ubj') </pre> @@ -294,7 +295,7 @@ and robust. Hopefully in a few future releases, the limitations become less. Here are the known issues: -# Any high-dimensional cell-array will be converted to a 1D array; +# 3D or higher dimensional cell/struct-arrays will be converted to 2D arrays; # When processing names containing multi-byte characters, Octave and MATLAB \ can give different field-names; you can use feature('DefaultCharacterSet','latin1') \ in MATLAB to get consistant results diff --git a/saveubjson.m b/saveubjson.m index 63b0b64c33f9d21ccd91f5f3f1063e4e6f538550..395c139c32a38035977226c9e1a89e449395a201 100644 --- a/saveubjson.m +++ b/saveubjson.m @@ -58,7 +58,7 @@ function json=saveubjson(rootname,obj,varargin) % a=struct('node',[1 9 10; 2 1 1.2], 'elem',[9 1;1 2;2 3],... % 'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ'); % saveubjson('mesh',a) -% saveubjson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g') +% saveubjson('mesh',a,'meshdata.ubj') % % license: % BSD or GPL version 3, see LICENSE_{BSD,GPLv3}.txt files for details