TJSONData.FormatJSON function
Return a formatted JSON representation of the data.
Declaration
function FormatJSON(Options: TFormatOptions=DefaultFormat;
Indentsize: Integer=DefaultIndentSize)
: TJSONStringTypeArguments
Options | Formatting options to apply. |
Indentsize | Amount of indent to use when starting new lines. |
Function result
The JSON representation of the instance.
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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
