Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | ATOMS
File : Details
Login with GitLab

JSON Export

Export Scilab structures to JSON
(932 downloads for this version - 2271 downloads for all versions)
Details
Version
1.0
A more recent valid version with binaries for Scilab exists: 2.0
Author
Christian Klauer
Maintainer
Christian Klauer
Category
License
Supported Scilab Version
5.5
Creation Date
March 17, 2015
Description
            
Rev 1 as of 4.3.15: Initial version
Rev 2 as of 4.3.15: added arrays of strings that are defined by e.g.
list('str1', 'str2')
Rev 3 as of 17.3.15: added support for vectors

    Example usage:

    clear a;
    a.Field1 = 2;
    a.Field2 = "jkh";
    a.Field3 = 1.2;
    a.F3.name = "Joe";
    a.F3.age = 32;
    //a.F3.data = [1,2];
    a.vector = [1,2,3,4.5];
    jsonstr = struct2json(a);
    disp(jsonstr);

    Warning: For strings make sure you escape the special characters that are
used by the JSON-format!

Maybe the precision of float values can be adjusted by the command
"format".            
Files (1)
[2.59 kB]
Miscellaneous file
	  
News (0)
Comments (0)
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.