Sign in Join
FPDoc Onlineexperiment

TJSONIniFile.ReadBool function

Member of TJSONIniFilepublicIn unit JsonIni

Reads a boolean value from the JSON ini file

Declaration

pascal
function ReadBool(const Section: string; const Ident: string; 
 Default: Boolean): Boolean; override

Arguments

Section

The section name to read from

Ident

The key name to read

Default

Default value to return if key not found or conversion failed

Function result

The boolean value or default if key not found or conversion failed

Description

ReadBool reads a boolean value from the specified section and key. If the stored value is a JSON boolean, it is returned directly. For other value types, the method attempts to convert them to boolean. If the key is not found or conversion fails, the Default value is returned.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.