Sign in Join
FPDoc Onlineexperiment

TCustomJSONPropStorage.Formatted property

Member of TCustomJSONPropStoragepublicIn unit JSONPropStorage

Controls whether formatted JSON is emitted in the JSONConf storage mechanism.

Declaration

pascal
property Formatted: Boolean read GetFormatted write SetFormatted;

Description

Formatted is a Boolean property which enables or disables formatted output for the JSON written to JSONFileName. When enabled, the JSON objects and elements are written with one named item per line and indenting for nested name/value pairs. For example:

{
  "TApplication" : {
    "Form1" : {
      "DBGrid1_AlternateColor" : "-2147483643",
      "Form1_Height" : "723",
      "Form1_Left" : "1215",
      "Form1_SessionProperties" : "DBGrid1.AlternateColor;Height;Left;SessionProperties;Top;Width",
      "Form1_Top" : "57",
      "Form1_Width" : "320"
    }
  }
}

If not enabled, all JSON values are generated on a single line with only whitespace between the JSON name and values.

The property value is assigned to JSONConf when the storage mechanism is allocated for the class instance in StorageNeeded.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.