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:
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.