Skip to content

TAbstractJSONWriter.WriteProperty

Write a named property to a JSON object

Declaration

Source position: jsonwriter.pp line 42

public 
procedure WriteProperty(const aName: TJSONStringType);

procedure WriteProperty(const aName: TJSONStringType; aValue: Boolean);

procedure WriteProperty(const aName: TJSONStringType; aValue: Integer);

procedure WriteProperty(const aName: TJSONStringType; aValue: Int64);

procedure WriteProperty(const aName: TJSONStringType; aValue: Double);

procedure WriteProperty(const aName: TJSONStringType; 
                       const aValue: string);

procedure WriteProperty(const aName: TJSONStringType; aValue: TStrings);

procedure WriteProperty(const aName: TJSONStringType; aValue: TJSONData);

Description

WriteProperty writes a named property to a JSON object. This method is overloaded for different data types and automatically handles the property name and value writing sequence. It calls StartProperty, WriteValue, and EndProperty in sequence.

See also

Name Description
StartProperty Start writing a property in a JSON object
WriteValue Write a JSON value to the output
EndProperty End writing a property in a JSON object