ExportJSON()
Syntax
Result = ExportJSON(#JSON, *Buffer, Size [, Flags])Description
Export the given JSON data to a memory location. The JSON data will be encoded in UTF-8 format.
Parameters
#JSON The JSON to export. *Buffer A writable memory location. Size The size of the memory location. If the size is not large enough to hold the entire JSON data, the function will fill the memory location with data, but then return failure. The ExportJSONSize() function can be used to determine the needed size. Flags (optional) If set to #PB_JSON_PrettyPrint, the composed string 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 the number of bytes written to the memory location on success. If the function fails, the result is 0.
See Also
ExportJSONSize(), ComposeJSON(), SaveJSON(), CatchJSON()
Supported OS
All