SaveJSON()

Syntax

Result = SaveJSON(#JSON, FileName$ [, Flags])
Description
Save the given JSON data to a file. The file will be encoded in UTF-8 (without a leading byte-order mark).

Parameters

#JSON The JSON to save.
Flags (optional) If set to #PB_JSON_PrettyPrint, the saved data will contain additional newline and whitespace for better readability. The extra whitespace is not significant to the JSON format. The output will have the same meaning to a JSON reader with or without this flag.

Return value

Returns non-zero if the file was saved successfully. If there is an error while saving the file, the result is zero.

See Also

ComposeJSON(), ExportJSON(), ExportJSONSize(), LoadJSON()

Supported OS

All

<- ResizeJSONElements() - Json Index - SetJSONArray() ->