TJObject.Add Method
Overloads
- TJObject.Add(string, string)
- TJObject.Add(string, Integer)
- TJObject.Add(string, Int64)
- TJObject.Add(string, Double)
- TJObject.Add(string, Boolean)
- TJObject.Add(string, TJElement)
TJObject.Add(string, string)
Adds or replaces a member with a string value.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; const Value: string); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| const | Value | string | The string value, wrapped in a TJPrimitive. |
See also
TJObject.Add(string, Integer)
Adds or replaces a member with an Integer value.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; const Value: Integer); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| const | Value | Integer | The Integer value, wrapped in a TJPrimitive. |
See also
TJObject.Add(string, Int64)
Adds or replaces a member with an Int64 value.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; const Value: Int64); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| const | Value | Int64 | The Int64 value, wrapped in a TJPrimitive. |
See also
TJObject.Add(string, Double)
Adds or replaces a member with a Double value.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; const Value: Double); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| const | Value | Double | The Double value, wrapped in a TJPrimitive. |
See also
TJObject.Add(string, Boolean)
Adds or replaces a member with a Boolean value.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; const Value: Boolean); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| const | Value | Boolean | The Boolean value, wrapped in a TJPrimitive. |
See also
TJObject.Add(string, TJElement)
Adds or replaces a member with a JSON element value.
Remarks
If a member with the same name already exists, its value is replaced.
Syntax
Unit: Bcl.Json.Classes
procedure TJObject.Add(const Name: string; Value: TJElement); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The name of the member. |
| Value | TJElement | The TJElement value. If nil, a TJNull is stored instead. |