Convert scilab variable to JSON.
result = toJSON(var) result = toJSON(var, indent) toJSON(var, filename) toJSON(var, filename, indent) toJSON(var, indent, filename)
The Scilab variable to convert in JSON format.
If a file name is given, the conversion is written in this file.
If this argument is given, the result is indented. The value is the number of spaces.
Result is a string which contain the data converted to JSON. If a filename is given, no result is returned.
This function convert a Scilab variable into a JSON string or a JSON file.
Version | Description |
6.1 | Function introduced. |
2023.0.0 | Handling of tabs (ascii(9)) changed. |