TJSONArray.Insert¶
Insert an element in the array.
Declaration¶
Source position: fpjson.pp line 590
public
procedure Insert(Index: Integer);
procedure Insert(Index: Integer; Item: TJSONData);
procedure Insert(Index: Integer; I: Integer);
procedure Insert(Index: Integer; I: Int64);
procedure Insert(Index: Integer; I: QWord);
procedure Insert(Index: Integer; const S: UnicodeString);
procedure Insert(Index: Integer; const S: TJSONStringType);
procedure Insert(Index: Integer; F: TJSONFloat);
procedure Insert(Index: Integer; B: Boolean);
procedure Insert(Index: Integer; AnArray: TJSONArray);
procedure Insert(Index: Integer; AnObject: TJSONObject);
Description¶
Insert adds a value or element to the array at position Index. Elements with index equal to or larger than Index are shifted. Like Add, it converts plain pascal values to JSON values.
Note that when inserting a TJSONData instance to the array, it is owned by the array. Index must be a value between 0 and Count-1.
Errors¶
If an invalid index is specified, an exception is raised.