===============================================================================
= JSONLab =
= An open-source MATLAB/Octave JSON encoder and decoder =
===============================================================================
* Copyright (C) 2011-2020 Qianqian Fang <q.fang at neu.edu>
* License: BSD, see License*.txt
* Version: 2.0 (Magnus Prime)
* JData Specification Version: Draft 3 (http://github.com/fangq/jdata)
* URL: http://openjdata.org/jsonlab
-------------------------------------------------------------------------------
Table of Content:
0. What's New
I. Introduction
II. Installation
III. Using JSONLab
IV. Using `jsave/jload` to share workspace
V. Sharing JSONLab created data files in Python
VI. Known Issues and TODOs
VII. Contribution and feedback
VIII.Acknowledgement
-------------------------------------------------------------------------------
0. What's New
JSONLab v2.0 - code named "Magnus Prime" - is a stable release of JSONLab and
a new milestone towards a stable, complete reference implementation of the
JData Specification (http://openjdata.org) for portable scientific data storage.
There have been many major updates added to this release since the previous
release v1.9.8 in Oct. 2019. A list of the major changes are summarized below
(with key features marked by *), including the support to `_ArrayShape_` to
efficiently encode special matrices and the addition of `jsave/jload` to save
and restore variables in MATLAB/Octave like the `save/load` commands (experimental):
* 2020-06-13 [81feef3] skil no-op markers, update documentation
* 2020-06-13 [4904155] jload load data to struct, test if loadbj input is buffer, update error msg
* 2020-06-12 [c334799] change default workspace to caller for jload and jsave
* 2020-06-10 [c883546] fix keeptype single integer bug
* 2020-06-09*[ ] created `jdata` and `bjdata` python modules to share data with MATLAB
* 2020-06-08*[cbde607] add savebj and loadbj to dedicate to loading and saving bjdata
* 2020-06-08*[e2451e1] add unit testing script, fix issues found in the testing unit
* 2020-06-06 [a44015f] accelerate fast_match_bracket, drop unicode2native for speed
* 2020-06-06 [eefccf3] call jsonencode/decode in jsave/jload, parse embedded jdata struct
* 2020-06-05 [9434103] support Toeplitz matrices, use case-insensitive comparison
* 2020-06-04 [3119ce4] jdatadecode now handles _ArrayOrder_
* 2020-06-04 [89b844c] remove forced root name, update internal test results
* 2020-06-02*[15ca7ae] add keeptype option to jsave and saveubjson
* 2020-06-02 [7f2cbc4] make jsave and jload work on octave
* 2020-06-01*[8829d6b] apply data compression to strings, new datatype char
* 2020-06-01 [270cbf6] fix loadmsgpack ND array issue
* 2020-06-01*[919f502] add jsave and jload for portable data sharing
* 2020-05-31 [df3a4fa] debug arrayshape related changes and test all demo scripts
* 2020-05-31*[fc0b285] adding support to _ArrayShape_ to record special matrices
* 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-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
* 2020-02-09*[6984111] add UseMap option to avoid key name conversion
* 2019-11-16 [e46221a] if _ArraySize_ has a single length, treat as a row vector
* 2019-11-01 [f2bfb65] fix a uint8 upper bound bug
* 2019-10-24 [cc4491d] avoid escaping base64 str, avoid double processing preencoded arrayzipdata
* 2019-10-24 [4dc76ef] make example script compatible with matlab R2010
* 2019-10-24 [ad8be26] disable underscore escaping in octave,update all tests and outputs
* 2019-10-24 [d4275c6] reduce jsonopt calls to speed up encoding and decoding
* 2019-10-23 [82c9e91] fix invalid jdatadecode example
* 2019-10-23 [398539d] reoptimize for speed
* 2019-10-22*[650b5ec] enable jdataencode in savejson and saveubjson
Please note that JSONLab v2.0 is now compliant with JData Spec Draft 3; in
comparison, v1.9.8 is compatible with Draft 2; v1.9 and previous releases are
compatible with Draft 1. JSONLab v2.0 can read all data files generated by
v1.9.8, but v1.9.8 can not read the new UBJSON markers introduced in v2.0.
The newly introduced `jsave/jload` functions are in the experimental stage.
They generate `.jamm` files which are renamed binary-JData/UBJSON files;
they can be 50% smaller than `.mat` files if using `jsave(...,'compression','lzma')`
and can be readily opened among a long list of programming environments
such as Python, JavaScript and Go.
The `saveubjson/loadubjson` functions added support to the Binary JData specification (BJData)
v1 Draft-1 (https://github.com/fangq/bjdata) and are now renamed as `savebj/loadbj`
(`saveubjson/loadubjson` are kept for compatibility purposes as aliases to the new
functions). The BJData spec is largely compatible with UBJSON spec Draft 12, with the
following differences (we are working with the UBJSON maintainer to merge
these two specifications):
* BJData adds 4 new numeric data types: `uint16 [u]`, `uint32 [m]`, `uint64 [M]` \
and `float16 [h]` ('''new in JSONLab v2.0''')
* BJData supports an optimized ND array container (supported in JSONLab since 2013)
* BJData does not convert `NaN/Inf/-Inf` to `null` (supported in JSONLab since 2013)
To avoid using the new type markers, one should attach `'UBJSON',1` in the `savebj`
command as
savebj('',data,'FileName','myfile.bjd','UBJSON',1);
To read data files generated by JSONLab v1.9 or older versions, you need to attach
option `'FormatVersion', 1.9` in all the `loadjson/savejson` function calls.
To convert an older file (JSON/UBJSON) to the new format, you should run
data=loadjson('my_old_data_file.json','FormatVersion',1.9)
savejson('',data,'FileName','new_file.json')
You are strongly encouraged to convert all pre-v1.9.8 generated data files using the new
format.
-------------------------------------------------------------------------------
I. Introduction
JSONLab is a free and open-source JSON/UBJSON/MessagePack encoder and
decoder written in the native MATLAB language. It can be used to convert a MATLAB
data structure (array, struct, cell, struct array, cell array, and objects) into
JSON/UBJSON/MessagePack formatted strings and files, or to parse a
JSON/UBJSON/MessagePack file into MATLAB data structure. JSONLab supports both
MATLAB and [http://www.gnu.org/software/octave GNU Octave] (a free MATLAB clone).
JSON ([http://www.json.org/ JavaScript Object Notation]) is a highly portable,
human-readable and [http://en.wikipedia.org/wiki/JSON "fat-free"] text format
to represent complex and hierarchical data, widely used for data-exchange in applications.
UBJSON ([http://ubjson.org/ Universal Binary JSON]) is a binary JSON format,
specifically designed to specifically address the limitations of JSON, permitting
efficient storage of binary data with strongly typed data records, resulting in smaller
file sizes and fast encoding and decoding. MessagePack is another binary
JSON-like data format widely used in data exchange in web/native applications.
It is slightly more compact than UBJSON, but is not directly readable compared
to UBJSON.
We envision that both JSON and its binary counterparts will play important
rules not only for light-weight data storage, but also for storage and interchange
of scientific data. It has both the flexibility and generality as in other general-purpose
file specifications, such as [http://www.hdfgroup.org/HDF5/whatishdf5.html HDF5]
but has significantly reduced complexity and excellent readab
没有合适的资源?快使用搜索试试~ 我知道了~
MATLAB设计_对JSON文件编码解码的工具箱.zip
共66个文件
m:43个
txt:6个
json:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 148 浏览量
2024-02-17
15:53:07
上传
评论
收藏 142KB ZIP 举报
温馨提示
MATLAB设计程序源码
资源推荐
资源详情
资源评论
收起资源包目录
MATLAB设计_对JSON文件编码解码的工具箱.zip (66个子文件)
jsonlab-2.0
lzmaencode.m 1KB
gendocs.sh 2KB
lz4decode.m 1KB
fast_match_bracket.m 3KB
loadubjson.m 1KB
lzipencode.m 1KB
lzmadecode.m 1KB
nestbracket2dim.m 2KB
jdatadecode.m 19KB
savemsgpack.m 994B
AUTHORS.txt 3KB
lz4hcencode.m 1KB
README.rst 26KB
lz4hcdecode.m 1KB
gzipencode.m 2KB
loadmsgpack.m 8KB
examples
demo_msgpack_basic.m 12KB
demo_jsonlab_basic.m 14KB
jsonlab_ubjson_basictest.matlab 19KB
example1.json 436B
jsonlab_speedtest.m 675B
jsonlab_selftest.matlab 4KB
example3.json 272B
example2.json 583B
example4.json 563B
demo_ubjson_basic.m 13KB
jsonlab_selftest.m 979B
jsonlab_basictest.matlab 22KB
README.txt 26KB
base64encode.m 1KB
loadjson.m 21KB
ChangeLog.txt 13KB
isoctavemesh.m 497B
mergestruct.m 729B
package.json 520B
jsonopt.m 899B
jsave.m 4KB
base64decode.m 1KB
lz4encode.m 1KB
loadbj.m 14KB
zlibdecode.m 2KB
jsonlab.prj 8KB
encodevarname.m 2KB
zlibencode.m 2KB
decodevarname.m 2KB
lzipdecode.m 1KB
varargin2struct.m 1KB
test
run_jsonlab_test.m 19KB
test_jsonlab.m 1KB
.gitignore 395B
images
jsonlab-banner.png 10KB
jsonlab-logo.png 3KB
savejson.m 28KB
gzipdecode.m 2KB
DESCRIPTION 662B
genlog.sh 63B
LICENSE_BSD.txt 2KB
savebj.m 33KB
jload.m 4KB
saveubjson.m 3KB
match_bracket.m 2KB
jdataencode.m 15KB
INDEX 581B
Contents.m 60KB
ignore.txt 18B
license.txt 2KB
共 66 条
- 1
资源评论
Nowl
- 粉丝: 1w+
- 资源: 3891
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功