JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave
JSON (JavaScript Object Notation) is a highly portable, human-readable and
"fat-free" text
format to represent complex and hierarchical data. It is as powerful as XML, but less
verbose. JSON format is widely used for data-exchange in applications, and is essential
for the wild success of Ajax and
Web2.0. With the fast advance of
web-based technologies, we envision that JSON will serve as a
mainstream data-exchange format for scientific research in the future, and
fulfill part of the roles achieved by HDF5.
JSONlab is a free and open-source implementation of a JSON encoder and a decoder
in the native MATLAB language. It can be used to convert a MATLAB data structure (array, struct,
cell, struct array and cell array) into JSON formatted string, or decode a JSON file
into MATLAB data. JSONlab supports both MATLAB and
GNU Octave (a free MATLAB clone).
JSONlab was developed by Qianqian Fang
at the Optics Division,
Martinos Center for Biomedical Imaging,
Massachusetts General Hospital/Harvard Medical School.
Why JSON?
- JSON is a human-readable and self-explanatory format
- JSON can represent arbitrarily complex datasets
- JSON parsers for most languages are available for free
- JSON data are web-friendly as it can be directly invoked (inline or load from remote site) in JavaScript
What's New
- [2012/12/18] JSONlab 0.9.1 is a stable release. Thanks to Niclas Borlin's fixes, jsonlab now has much better handling of empty and sparse matrices.
- [2012/06/20] JSONlab 0.9.0 is here!. It has all the bug fixes and better loadjson-savejson round-trip consistency. Find details in ChangeLogs.
- [2012/03/05] JSONlab 0.8.1 is ready for download. It features several bug fixes for proper handling of root-less objects and quotation marks. Read ChangeLogs for details.
- [2012/01/13] JSONlab 0.8.0 (Sentinel) has arrived!. It contains major speed enhancements (20x) to loadjson for processing large data arrays, and several bug fixes. Please see ChangeLogs for more details. Get it from here.
- [2011/10/21] JSONlab 0.5.1 (Nexus update 1) is available, fixing slow speed of loadjson and support JSON collection (a series of "{...}" enclosed JSON objects in a single file). See ChangeLogs.
- [2011/10/16] First JSONlab release, 0.5 (Nexus), is ready for download.
- [2011/10/10] First public announcement of the JSONlab project.