Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This toolbox contains patches submitted by the following contributors:
(PR#40) Feature: Reformat README to README.rst

- Anton <https://github.com/dasantonym>
(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 <https://github.com/pjkoprowski>
(PR#55) Feature: Added Encoding option to loadjson and savejson.
6 changes: 3 additions & 3 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MessagePack
JData Workspace
jload
jsave
JData Specificaton
JData Specification
jdatadecode
jdataencode
Interface
Expand Down
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ III.Using JSONLab

JSONLab provides a pair of functions, `loadjson` -- a JSON parser, and `savejson` --
a MATLAB-to-JSON encoder, to read/write text-based JSON; it also provides
three equivallent pairs -- `loadbj/savebj` for binary JData, `loadubjson/saveubjson`
three equivalent pairs -- `loadbj/savebj` for binary JData, `loadubjson/saveubjson`
for UBJSON and `loadmsgpack/savemsgpack` for MessagePack. The `load*` functions
for the 3 supported data formats share almost the same input parameter format,
similarly for the 3 `save*` functions (`savejson/saveubjson/savemsgpack`).
Expand Down Expand Up @@ -561,7 +561,7 @@ The `loadjson.m` function was significantly modified from the earlier parsers

* Nedialko Krouchev: http://www.mathworks.com/matlabcentral/fileexchange/25713
created on 2009/11/02
* Fran�ois Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393
* Fran�ois Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393
created on 2009/03/22
* Joel Feenstra:
http://www.mathworks.com/matlabcentral/fileexchange/20565
Expand Down
2 changes: 1 addition & 1 deletion encodevarname.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
%
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_jsonlab_basic.m
Original file line number Diff line number Diff line change
Expand Up @@ -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=''
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_msgpack_basic.m
Original file line number Diff line number Diff line change
Expand Up @@ -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=''
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_ubjson_basic.m
Original file line number Diff line number Diff line change
Expand Up @@ -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=''
Expand Down
2 changes: 1 addition & 1 deletion examples/jsonlab_basictest.matlab
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ json2data =

>> >>
%=================================================
>> % an ampty string
>> % an empty string
>> %=================================================

>> >>
Expand Down
2 changes: 1 addition & 1 deletion examples/jsonlab_ubjson_basictest.matlab
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ json2data =

>> >>
%=================================================
>> % an ampty string
>> % an empty string
>> %=================================================

>> >>
Expand Down
2 changes: 1 addition & 1 deletion examples/random_json_joke.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion fast_match_bracket.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gendocs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#============================================================
# JSONLAB inline documentation to wiki convertor
# JSONLAB inline documentation to wiki converter
#
# Author: Qianqian Fang <q.fang at neu.edu>
#============================================================
Expand Down
2 changes: 1 addition & 1 deletion jdataencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions loadbj.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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/
%
Expand Down
10 changes: 5 additions & 5 deletions loadjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -84,13 +84,13 @@
% {{jsonpath1,[start,length,<whitespace_pre>]},
% {jsonpath2,[start,length,<whitespace_pre>]}, ...}
% 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/
%
Expand All @@ -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
Expand Down Expand Up @@ -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]
%
Expand Down
2 changes: 1 addition & 1 deletion match_bracket.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions savebj.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions savejson.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down