Rank: 66051 based on 0 downloads (last 30 days) and 0 file submitted
photo

Jorge Herrera

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Jorge
Updated File Comments Rating
05 Mar 2012 json4mat This Matlab toolbox converts JSON formats into (json2mat) and from (mat2json) Matlab structures. Author: Jonas Almeida

Great tool! I just found a small bug. The code fails to write a correct JSON object when there's an empty array (and probably also fails with an empty cell).

Line 29 in mat2json.m it reads:

J(end)=']';

When the array is empty, this line will replace the opening '[' with the closing ']' (there's no trailing comma to replace!). A simple length check or string comparison to handle this edge case should fix it.

Thanks,
Jorge

Contact us