Skip to content

TJSONIniFile.Create

Creates a new TJSONIniFile instance

Declaration

Source position: jsonini.pp line 53

public 
constructor Create(const AFileName: string; 
                  AOptions: TIniFileOptions=[]);  override;  overload; overload;

constructor Create(AStream: TStream; AOptions: TJSONOptions);  overload; overload;

Description

Create creates a new TJSONIniFile instance. The constructor has two overloaded forms:

  • Create(AFileName, AOptions) - Creates an instance that reads from and writes to the specified file
  • Create(AStream, AOptions) - Creates an instance that reads from the provided stream

If the file specified in AFileName does not exist, a new empty JSON object is created. If the file exists, it is parsed as JSON and loaded into memory.

See also

Name Description
UpdateFile Writes the JSON data to file
TCustomIniFile.Create Instantiate a new instance of TCustomIniFile.