Skip to content

Commit 22d297e

Browse files
authored
[doc] fix README.rst formatting issues
1 parent 36fef2c commit 22d297e

1 file changed

Lines changed: 40 additions & 40 deletions

File tree

README.rst

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ new features include
5656
5. dynamically cache linked data files (``jsoncache``, ``jdlink``) to permit on-demand download and
5757
processing of complex JSON-encoded datasets such as neuroimaging datasets hosted on https://neurojson.io
5858
6. support high-performance Blosc2 meta-compressor for storing large N-D array data,
59-
7. ``savejson/loadjson`` can use MATLAB/Octave built-in ``jsonencode/jsondecode`` using the `BuiltinJSON` option
59+
7. ``savejson/loadjson`` can use MATLAB/Octave built-in ``jsonencode/jsondecode`` using the ``BuiltinJSON`` option
6060
8. automatically switch from struct to containers.Map when encoded key-length exceeds 63
6161
9. provide fall-back zlib/gzip compression/decompression function on Octave when ZMat is not installed
6262

@@ -204,13 +204,13 @@ following breaking differences:
204204
To avoid using the new features, one should attach ``'UBJSON',1`` and ``'Endian','B'``
205205
in the ``savebj`` command as
206206

207-
.. code-block:: matlab
207+
.. code-block::
208208
209209
savebj('',data,'FileName','myfile.bjd','UBJSON',1, 'Endian','B');
210210
211211
To read BJData data files generated by JSONLab v2.0, you should call
212212

213-
.. code-block:: matlab
213+
.. code-block::
214214
215215
data=loadbj('my_old_data_file.bjd','Endian','B')
216216
@@ -305,9 +305,9 @@ MATLAB running in the ``-nojvm`` mode or GNU Octave, or 'lzma/lzip/lz4/lz4hc'
305305
compression methods are specified. ZMat can also compress large arrays that
306306
MATLAB's Java-based compression API does not support.
307307

308-
----------
308+
-------------------------------------
309309
Install JSONLab on Fedora 24 or later
310-
----------
310+
-------------------------------------
311311

312312
JSONLab has been available as an official Fedora package since 2015. You may
313313
install it directly using the below command
@@ -324,9 +324,9 @@ To enable data compression/decompression, you need to install ``octave-zmat`` us
324324
325325
Then open Octave, and type ``pkg load jsonlab`` to enable jsonlab toolbox.
326326

327-
----------
327+
-------------------------
328328
Install JSONLab on Debian
329-
----------
329+
-------------------------
330330

331331
JSONLab is currently available on Debian Bullseye. To install, you may run
332332

@@ -336,9 +336,9 @@ JSONLab is currently available on Debian Bullseye. To install, you may run
336336
337337
One can alternatively install ``matlab-jsonlab`` if MATLAB is available.
338338

339-
----------
339+
-------------------------
340340
Install JSONLab on Ubuntu
341-
----------
341+
-------------------------
342342

343343
JSONLab is currently available on Ubuntu 21.04 or newer as package
344344
`octave-jsonlab`. To install, you may run
@@ -366,9 +366,9 @@ to add this PPA, and then use
366366
367367
to install the toolbox. ``octave-zmat`` will be automatically installed.
368368

369-
----------
369+
------------------------------
370370
Install JSONLab on Arch Linux
371-
----------
371+
------------------------------
372372

373373
JSONLab is also available on Arch Linux. You may install it using the below command
374374

@@ -412,7 +412,7 @@ core functions for encoding/decoding JSON/UBJSON/MessagePack data.
412412
savejson.m
413413
----------
414414

415-
.. code-block:: matlab
415+
.. code-block::
416416
417417
jsonmesh=struct('MeshNode',[0 0 0;1 0 0;0 1 0;1 1 0;0 0 1;1 0 1;0 1 1;1 1 1],...
418418
'MeshElem',[1 2 4 8;1 3 4 8;1 2 6 8;1 5 6 8;1 5 7 8;1 3 7 8],...
@@ -434,29 +434,29 @@ savejson.m
434434
loadjson.m
435435
----------
436436

437-
.. code-block:: matlab
437+
.. code-block::
438438
439439
loadjson('{}')
440440
dat=loadjson('{"obj":{"string":"value","array":[1,2,3]}}')
441441
dat=loadjson(['examples' filesep 'example1.json'])
442442
dat=loadjson(['examples' filesep 'example1.json'],'SimplifyCell',0)
443443
444-
-------------
444+
-------------------------------------
445445
savebj.m (saveubjson.m as an alias)
446-
-------------
446+
-------------------------------------
447447

448-
.. code-block:: matlab
448+
.. code-block::
449449
450450
a={single(rand(2)), struct('va',1,'vb','string'), 1+2i};
451451
savebj(a)
452452
savebj('rootname',a,'testdata.ubj')
453453
savebj('zeros',zeros(100),'Compression','gzip')
454454
455-
-------------
455+
-------------------------------------
456456
loadbj.m (loadubjson.m as an alias)
457-
-------------
457+
-------------------------------------
458458

459-
.. code-block:: matlab
459+
.. code-block::
460460
461461
obj=struct('string','value','array',single([1 2 3]),'empty',[],'magic',uint8(magic(5)));
462462
ubjdata=savebj('obj',obj);
@@ -465,20 +465,20 @@ loadbj.m (loadubjson.m as an alias)
465465
isequaln(obj,dat.obj)
466466
dat=loadbj(savebj('',eye(10),'Compression','zlib','CompressArraySize',1))
467467
468-
----------
468+
-------------
469469
jdataencode.m
470-
----------
470+
-------------
471471

472-
.. code-block:: matlab
472+
.. code-block::
473473
474474
jd=jdataencode(struct('a',rand(5)+1i*rand(5),'b',[],'c',sparse(5,5)))
475475
savejson('',jd)
476476
477-
----------
477+
-------------
478478
jdatadecode.m
479-
----------
479+
-------------
480480

481-
.. code-block:: matlab
481+
.. code-block::
482482
483483
rawdata=struct('a',rand(5)+1i*rand(5),'b',[],'c',sparse(5,5));
484484
jd=jdataencode(rawdata)
@@ -501,19 +501,19 @@ and ``loadubjson`` functions for various matlab data structures, and
501501
Please run these examples and understand how JSONLab works before you use
502502
it to process your data.
503503

504-
---------
504+
------------
505505
unit testing
506-
---------
506+
------------
507507

508508
Under the ``test`` folder, you can find a script to test individual data types and
509509
inputs using various encoders and decoders. This unit testing script also serves as
510510
a **specification validator** to the JSONLab functions and ensure that the outputs
511511
are compliant to the underlying specifications.
512512

513513

514-
================
514+
========================================
515515
Using ``jsave/jload`` to share workspace
516-
================
516+
========================================
517517

518518
Starting from JSONLab v2.0, we provide a pair of functions, ``jsave/jload`` to store
519519
and retrieve variables from the current workspace, similar to the ``save/load``
@@ -541,7 +541,7 @@ The main benefits of using .pmat file to share matlab variables include
541541
jsave.m
542542
----------
543543

544-
.. code-block:: matlab
544+
.. code-block::
545545
546546
jsave % save the current workspace to default.pmat
547547
jsave mydata.pmat
@@ -553,7 +553,7 @@ jsave.m
553553
jload.m
554554
----------
555555

556-
.. code-block:: matlab
556+
.. code-block::
557557
558558
jload % load variables from default.pmat to the current workspace
559559
jload mydata.pmat % load variables from mydata.pmat
@@ -562,9 +562,9 @@ jload.m
562562
jload('mydata.json')
563563
564564
565-
================
565+
================================================
566566
Sharing JSONLab created data files in Python
567-
================
567+
================================================
568568

569569
Despite the use of portable data annotation defined by the JData Specification,
570570
the output JSON files created by JSONLab are 100% JSON compatible (with
@@ -615,7 +615,7 @@ The above modules require built-in Python modules ``json`` and NumPy (``numpy``)
615615

616616
Once the necessary modules are installed, one can type ``python`` (or ``python3``), and run
617617

618-
.. code-block:: python
618+
.. code-block::
619619
620620
import jdata as jd
621621
import numpy as np
@@ -710,9 +710,9 @@ mailing list to report any questions you may have regarding JSONLab:
710710
Acknowledgement
711711
==========================
712712

713-
---------
713+
----------
714714
loadjson.m
715-
---------
715+
----------
716716

717717
The ``loadjson.m`` function was significantly modified from the earlier parsers
718718
(BSD 3-clause licensed) written by the below authors
@@ -725,9 +725,9 @@ The ``loadjson.m`` function was significantly modified from the earlier parsers
725725
http://www.mathworks.com/matlabcentral/fileexchange/20565
726726
created on 2008/07/03
727727

728-
---------
728+
-------------
729729
loadmsgpack.m
730-
---------
730+
-------------
731731

732732
* Author: Bastian Bechtold
733733
* URL: https://github.com/bastibe/matlab-msgpack/blob/master/parsemsgpack.m
@@ -761,9 +761,9 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
761761
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
762762
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
763763

764-
---------
764+
---------------------------------------------------------------------------------------
765765
zlibdecode.m, zlibencode.m, gzipencode.m, gzipdecode.m, base64encode.m, base64decode.m
766-
---------
766+
---------------------------------------------------------------------------------------
767767

768768
* Author: Kota Yamaguchi
769769
* URL: https://www.mathworks.com/matlabcentral/fileexchange/39526-byte-encoding-utilities

0 commit comments

Comments
 (0)