Using JSON is a more standardized way to convert text and text files to structures (or objects). XML is of course another standard and it is built into MATLAB, but it can be more effort than parsing JSON,
Here is a MATLAB JSON parser By Q Fang:
http://www.mathworks.com/matlabcentral/fileexchange/33381-jsonlab-a-toolbox-to-encodedecode-json-files-in-matlaboctave
Also see these JSON references:
http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?jsonlab/Doc
http://json.org/
http://www.mathworks.com/matlabcentral/fileexchange/20565
http://www.mathworks.com/matlabcentral/fileexchange/23393
Here are some XML references:
http://www.mathworks.com/help/techdoc/ref/xmlread.html
http://www.mathworks.com/matlabcentral/fileexchange/28518-xml2struct
http://www.mathworks.com/matlabcentral/fileexchange/28639-struct2xml