[Overview][Classes][Procedures and functions][Index] Reference for unit 'JSONPropStorage' (#lcl)

TCustomJSONPropStorage.DoWriteString

Performs actions needed to write the specified Section and Ident to the JSON storage mechanism as a String type.

Declaration

Source position: jsonpropstorage.pas line 40

public procedure TCustomJSONPropStorage.DoWriteString(

  const Section: string;

  const Ident: string;

  const Value: string

); override;

Arguments

Section

  

Name for the section where the value is stored.

Ident

  

Name for the identifier where the value is stored.

Value

  

String value stored in the method.

Description

DoWriteString is an overridden method used to implement the WriteString method in the TCustomPropertyStorage ancestor. DoWriteString ensures that Value is converted from the UTF-8 encoding used in the argument to the UTF-16 encoding (UnicodeString) used in JSONConf (TJSONConfig).

The Value argument is stored using the identifiers in the Section and Ident parameters. They are converted from the their representation as dotted-LCL component names and properties to the '/'- delimited XPATH-like notation. For example:

'TApplication', 'Form1.Width' => 'TApplication/Form1/Width'
Remark: Please note that any component which does not have an explicit value in its Name property defaults to the ClassName for the component, like 'TApplication'.

Use active to enable or disable read and write operations to the JSON property storage mechanism.

See also

TCustomJSONPropStorage.JSONConf

  

TJSONConfig instance used to store path/value pairs.

TCustomJSONPropStorage.FixPath

  

Converts component/property names using '.' delimiters to the '/' delimiter used for the JSON notation in the JSONConfig storage mechanism.

TCustomPropertyStorage.WriteString

  

Writes a String to the RootSection.

TCustomPropertyStorage.Active

  

Indicates whether the container is Active and allows access to its storage.


Version 4.0 Generated 2025-05-03 Home