toJSON
Convert scilab variable to JSON.
Syntax
result = toJSON(var) result = toJSON(var, indent) toJSON(var, filename) toJSON(var, filename, indent) toJSON(var, indent, filename)
Arguments
- var
The Scilab variable to convert in JSON format.
- filename
If a file name is given, the conversion is written in this file.
- indent
If this argument is given, the result is indented. The value is the number of spaces.
- result
Result is a string which contain the data converted to JSON. If a filename is given, no result is returned.
Description
This function convert a Scilab variable into a JSON string or a JSON file.
Examples
See also
- http_post — HTTP POST request.
- http_put — HTTP PUT request.
- http_patch — HTTP PATCH request.
- http_delete — HTTP DELETE request.
- http_upload — HTTP POST or PUT request to upload file(s) on server.
- fromJSON — Convert JSON to scilab variable.
- http_get — HTTP GET request.
History
Версия | Описание |
6.1 | Function introduced. |
2023.0.0 | Handling of tabs (ascii(9)) changed. |
Report an issue | ||
<< http_upload | Web Tools | url_decode >> |