diff --git a/AUTHORS.txt b/AUTHORS.txt index 8a2f298..7c4ef26 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -79,7 +79,7 @@ This toolbox contains patches submitted by the following contributors: (PR#40) Feature: Reformat README to README.rst - Anton - (PR#41) Feature: Added package.json to be able to intall via npm package manager + (PR#41) Feature: Added package.json to be able to install via npm package manager - Paul Koprowski (PR#55) Feature: Added Encoding option to loadjson and savejson. diff --git a/ChangeLog.txt b/ChangeLog.txt index d31ba20..7fa5352 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -54,7 +54,7 @@ JSONlab ChangeLog (key features marked by *): 2020-05-15*[d88d454] jsonlab is compatible with matlab R2008 2020-05-13 [86efe89] flag to prevent embedding ND array size specifier 2020-05-07 [a189a50] use more robust integer type testing - 2020-05-06*[82f5249] saveubjson now implments BJData spec Draft1,https://github.com/fangq/bjdata + 2020-05-06*[82f5249] saveubjson now implements BJData spec Draft1,https://github.com/fangq/bjdata 2020-05-03 [34bca22] add prj file to compile a matlab package, close #60 2020-05-03 [82dfdcc] handle empty array in loadmsgpack, fix #63, patch by stfnp 2020-03-08 [7499bd8] Merge pull request #61 from j2L4e/patch-1 @@ -136,7 +136,7 @@ JSONlab ChangeLog (key features marked by *): 2018-07-12 [e090f0a] fix octave warning for saveubjson 2018-07-12*[34284c7] fix issues #34 #39 #44 and #45, support double-quoted strings 2017-09-06 [474d8c8] Merge pull request #41 from dasantonym/master - 2017-08-07*[38b24fb] added package.json to be able to intall via npm package manager, converted readme to utf-8, added basic .gitignore file + 2017-08-07*[38b24fb] added package.json to be able to install via npm package manager, converted readme to utf-8, added basic .gitignore file 2017-07-19 [ae7a5d9] Merge pull request #40 from astorfi/master 2017-07-17 [154ef61] Rename README.txt to README.rst 2017-03-27 [31b5bdc] simplify condition flow in matching_bracket @@ -171,7 +171,7 @@ JSONlab ChangeLog (key features marked by *): 2015/05/05 make options case insensitive 2015/05/01 reading unicode encoded json files (thanks to Sertan Senturk,Issue#3) 2015/04/30 allow \uXXXX to represent a unicode in a string (Issue#2) - 2015/03/30 save a 0x0 solid real empty array as null and handel empty struct array + 2015/03/30 save a 0x0 solid real empty array as null and handle empty struct array 2015/03/30 properly handle escape characters in a string 2015/01/24 *implement the UBJSON Draft12 new name format 2015/01/13 correct cell array indentation inconsistency diff --git a/INDEX b/INDEX index dad5b23..de02aec 100644 --- a/INDEX +++ b/INDEX @@ -11,7 +11,7 @@ MessagePack JData Workspace jload jsave -JData Specificaton +JData Specification jdatadecode jdataencode Interface diff --git a/encodevarname.m b/encodevarname.m index e55f07f..99341b3 100644 --- a/encodevarname.m +++ b/encodevarname.m @@ -23,7 +23,7 @@ % if the encoded variable name CAN NOT be longer than 63, i.e. % the maximum variable name specified by namelengthmax, and % one uses the output of this function as a struct or variable -% name, the name will be trucated at 63. Please consider using +% name, the name will be truncated at 63. Please consider using % the name as a containers.Map key, which does not have such % limit. % diff --git a/examples/demo_jsonlab_basic.m b/examples/demo_jsonlab_basic.m index 4ba6a1c..a1e21b1 100644 --- a/examples/demo_jsonlab_basic.m +++ b/examples/demo_jsonlab_basic.m @@ -27,7 +27,7 @@ json2data=loadjson(ans) fprintf(1,'\n%%=================================================\n') -fprintf(1,'%% an ampty string \n') +fprintf(1,'%% an empty string \n') fprintf(1,'%%=================================================\n\n') data2json='' diff --git a/examples/demo_msgpack_basic.m b/examples/demo_msgpack_basic.m index 23544df..eda90fb 100644 --- a/examples/demo_msgpack_basic.m +++ b/examples/demo_msgpack_basic.m @@ -23,7 +23,7 @@ json2data=loadmsgpack(ans) fprintf(1,'\n%%=================================================\n') -fprintf(1,'%% an ampty string \n') +fprintf(1,'%% an empty string \n') fprintf(1,'%%=================================================\n\n') data2json='' diff --git a/examples/demo_ubjson_basic.m b/examples/demo_ubjson_basic.m index 1f8a12a..e7cb4d5 100644 --- a/examples/demo_ubjson_basic.m +++ b/examples/demo_ubjson_basic.m @@ -23,7 +23,7 @@ json2data=loadbj(ans) fprintf(1,'\n%%=================================================\n') -fprintf(1,'%% an ampty string \n') +fprintf(1,'%% an empty string \n') fprintf(1,'%%=================================================\n\n') data2json='' diff --git a/examples/jsonlab_basictest.matlab b/examples/jsonlab_basictest.matlab index 072415c..6c70c77 100644 --- a/examples/jsonlab_basictest.matlab +++ b/examples/jsonlab_basictest.matlab @@ -55,7 +55,7 @@ json2data = >> >> %================================================= ->> % an ampty string +>> % an empty string >> %================================================= >> >> diff --git a/examples/jsonlab_ubjson_basictest.matlab b/examples/jsonlab_ubjson_basictest.matlab index 4ba3c44..e380d05 100644 --- a/examples/jsonlab_ubjson_basictest.matlab +++ b/examples/jsonlab_ubjson_basictest.matlab @@ -53,7 +53,7 @@ json2data = >> >> %================================================= ->> % an ampty string +>> % an empty string >> %================================================= >> >> diff --git a/examples/random_json_joke.m b/examples/random_json_joke.m index 4ee776a..44d3a4b 100644 --- a/examples/random_json_joke.m +++ b/examples/random_json_joke.m @@ -5,7 +5,7 @@ % to define linked JSON/binary JSON data using external files or URL on the % web. In the below example, the jokeapi.dev feed returns a JSON record via % RESTFul URL, the returned record contains a subfield called `joke`, which -% can be retrieved via the JSONPath $.joke attched after the URL, separated +% can be retrieved via the JSONPath $.joke attached after the URL, separated % by a colon. The general _DataLink_ URL is in the form of "URL:$jsonpath" if(nargin==0) diff --git a/fast_match_bracket.m b/fast_match_bracket.m index cfeba3d..2a032a9 100644 --- a/fast_match_bracket.m +++ b/fast_match_bracket.m @@ -23,7 +23,7 @@ % endpos: if a matching bracket is found, return its position in the original % string % maxlevel: return the depth of the enclosed brackets between the searched pair, -% includig the searching pair. For example, the matching closing-bracket +% including the searching pair. For example, the matching closing-bracket % of the 1st square bracket (startpos=2) in '[[[]],[]]' returns a % position of 9, with a maximum depth of 3; searching for the closing % bracket for the 2nd square bracket (startpos=3) returns a position of diff --git a/gendocs.sh b/gendocs.sh index 02b366d..aa6fa25 100755 --- a/gendocs.sh +++ b/gendocs.sh @@ -1,7 +1,7 @@ #!/bin/sh #============================================================ -# JSONLAB inline documentation to wiki convertor +# JSONLAB inline documentation to wiki converter # # Author: Qianqian Fang #============================================================ diff --git a/jdataencode.m b/jdataencode.m index 4abf4d3..43d5af3 100644 --- a/jdataencode.m +++ b/jdataencode.m @@ -375,7 +375,7 @@ else propertynames = properties(item); for p = 1:numel(propertynames) - for o = numel(item):-1:1 % aray of objects + for o = numel(item):-1:1 % array of objects newitem(o).(propertynames{p}) = item(o).(propertynames{p}); end end diff --git a/loadbj.m b/loadbj.m index e0a6f16..487f645 100644 --- a/loadbj.m +++ b/loadbj.m @@ -49,7 +49,7 @@ % flag to 1. % UseMap [0|1]: if set to 1, loadbj uses a containers.Map to % store map objects; otherwise use a struct object -% ObjectID [0|interger or list]: if set to a positive number, +% ObjectID [0|integer or list]: if set to a positive number, % it returns the specified JSON object by index % in a multi-JSON document; if set to a vector, % it returns a list of specified objects. @@ -74,11 +74,11 @@ % mmap: (optional) a cell array in the form of % {{jsonpath1,[start,length]}, {jsonpath2,[start,length]}, ...} % where jsonpath_i is a string in the form of JSONPath, and -% start is an integer referring to the offset from the begining +% start is an integer referring to the offset from the beginning % of the stream, and length is the JSON object string length. % For more details, please see the help section of loadjson.m % -% The format of the mmap table retruned from this function +% The format of the mmap table returned from this function % follows the JSON-Mmap Specification Draft 1 [3] defined by the % NeuroJSON project, see https://neurojson.org/jsonmmap/draft1/ % diff --git a/loadjson.m b/loadjson.m index d62e71b..96c5727 100644 --- a/loadjson.m +++ b/loadjson.m @@ -56,7 +56,7 @@ % please set FormatVersion to 1.9 or earlier. % Encoding ['']: json file encoding. Support all encodings of % fopen() function -% ObjectID [0|interger or list]: if set to a positive number, +% ObjectID [0|integer or list]: if set to a positive number, % it returns the specified JSON object by index % in a multi-JSON document; if set to a vector, % it returns a list of specified objects. @@ -84,13 +84,13 @@ % {{jsonpath1,[start,length,]}, % {jsonpath2,[start,length,]}, ...} % where jsonpath_i is a string in the JSONPath [1,2] format, and -% "start" is an integer referring to the offset from the begining +% "start" is an integer referring to the offset from the beginning % of the stream, and "length" is the JSON object string length. % An optional 3rd integer "whitespace_pre" may appear to record % the preceding whitespace length in case expansion of the data % record is needed when using the mmap. % -% The format of the mmap table retruned from this function +% The format of the mmap table returned from this function % follows the JSON-Mmap Specification Draft 1 [3] defined by the % NeuroJSON project, see https://neurojson.org/jsonmmap/draft1/ % @@ -100,7 +100,7 @@ % % The JSONPath keys used in mmap is largely compatible to the % upstream specification defined in [1], with a slight extension -% to handle contatenated JSON files. +% to handle concatenated JSON files. % % In the mmap jsonpath key, a '$' denotes the root object, a '.' % denotes a child of the preceding element; '.key' points to the @@ -132,7 +132,7 @@ % {"root3": ...} % % we use '$' or '$0' for the first root-object, and '$1' refers -% to the 2nd root object (["root2",...]) and '$2' referrs to the +% to the 2nd root object (["root2",...]) and '$2' refers to the % 3rd root object, and so on. Please note that this syntax is an % extension from the JSONPath documentation [1,2] % diff --git a/match_bracket.m b/match_bracket.m index f84d499..6fc965a 100644 --- a/match_bracket.m +++ b/match_bracket.m @@ -20,7 +20,7 @@ % endpos: if a matching bracket is found, return its position in the original % string % maxlevel: return the depth of the enclosed brackets between the searched pair, -% includig the searching pair. For example, the matching closing-bracket +% including the searching pair. For example, the matching closing-bracket % of the 1st square bracket (startpos=2) in '[[[]],[]]' returns a % position of 9, with a maximum depth of 3; searching for the closing % bracket for the 2nd square bracket (startpos=3) returns a position of diff --git a/savebj.m b/savebj.m index ebb2e1f..a61d9b5 100644 --- a/savebj.m +++ b/savebj.m @@ -73,7 +73,7 @@ % JSONP [''|string]: to generate a JSONP output (JSON with padding), % for example, if opt.JSON='foo', the JSON data is % wrapped inside a function call as 'foo(...);' -% UnpackHex [1|0]: conver the 0x[hex code] output by loadjson +% UnpackHex [1|0]: convert the 0x[hex code] output by loadjson % back to the string form % Compression 'zlib', 'gzip', 'lzma', 'lzip', 'lz4' or 'lz4hc': specify array % compression method; currently only supports 6 methods. The @@ -84,7 +84,7 @@ % it to uint8 or int8 array first. The compressed % array uses three extra fields % "_ArrayZipType_": the opt.Compression value. -% "_ArrayZipSize_": a 1D interger array to +% "_ArrayZipSize_": a 1D integer array to % store the pre-compressed (but post-processed) % array dimensions, and % "_ArrayZipData_": the binary stream of @@ -710,7 +710,7 @@ else propertynames = properties(item); for p = 1:numel(propertynames) - for o = numel(item):-1:1 % aray of objects + for o = numel(item):-1:1 % array of objects st(o).(propertynames{p}) = item(o).(propertynames{p}); end end diff --git a/savejson.m b/savejson.m index d07a3e1..3e34a48 100644 --- a/savejson.m +++ b/savejson.m @@ -68,7 +68,7 @@ % JSONP [''|string]: to generate a JSONP output (JSON with padding), % for example, if opt.JSONP='foo', the JSON data is % wrapped inside a function call as 'foo(...);' -% UnpackHex [1|0]: conver the 0x[hex code] output by loadjson +% UnpackHex [1|0]: convert the 0x[hex code] output by loadjson % back to the string form % SaveBinary [1|0]: 1 - save the JSON file in binary mode; 0 - text mode. % Compact [0|1]: 1- out compact JSON format (remove all newlines and tabs) @@ -81,7 +81,7 @@ % it to uint8 or int8 array first. The compressed % array uses three extra fields % "_ArrayZipType_": the opt.Compression value. -% "_ArrayZipSize_": a 1D interger array to +% "_ArrayZipSize_": a 1D integer array to % store the pre-compressed (but post-processed) % array dimensions, and % "_ArrayZipData_": the "base64" encoded @@ -683,7 +683,7 @@ else propertynames = properties(item); for p = 1:numel(propertynames) - for o = numel(item):-1:1 % aray of objects + for o = numel(item):-1:1 % array of objects st(o).(propertynames{p}) = item(o).(propertynames{p}); end end