TJSONData.FormatJSON¶
Return a formatted JSON representation of the data.
Declaration¶
Source position: fpjson.pp line 189
public
function TJSONData.FormatJSON(Options: TFormatOptions=DefaultFormat;
Indentsize: Integer=DefaultIndentSize)
: TJSONStringType;
Description¶
FormatJSON returns a formatted JSON representation of the data. For simple JSON values, this is the same representation as the AsJSON property, but for complex values (TJSONArray and TJSONObject) the JSON is formatted differently.
There are some optional parameters to control the formatting. Options controls the use of whitespace and newlines. IndentSize controls the amount of indent applied when starting a new line.
The implementation is not optimized for speed.
See also¶
| Name | Description |
|---|---|
| AsJSON | Return a JSON representation of the value. |
| TFormatOptions | Set of TFormatOption options. |