Skip to content

TJSONArray

Class of TJSONArray.

Declaration

Source position: fpjson.pp line 504

type

  TJSONArray = class(TJSONData)
  public
    constructor Create; overload;
    constructor Create(const Elements: Array of const); overload;
    destructor Destroy;
    class function JSONType : TJSONtype;
    function Clone : TJSONData;
    procedure Iterate;
    function IndexOf : Integer;
    function GetEnumerator : TBaseJSONEnumerator;
    procedure Clear;
    function Add(Item: TJSONData) : Integer;
    function Add(I: Integer) : Integer;
    function Add(I: Int64) : Int64;
    function Add(I: QWord) : QWord;
    function Add(const S: UnicodeString) : Integer;
    function Add(const S: TJSONStringType) : Integer;
    function Add : Integer;
    function Add(F: TJSONFloat) : Integer;
    function Add(B: Boolean) : Integer;
    function Add(AnArray: TJSONArray) : Integer;
    function Add(AnObject: TJSONObject) : Integer;
    procedure Delete;
    procedure Exchange;
    function Extract(Item: TJSONData) : TJSONData;
    function Extract(Index: Integer) : TJSONData;
    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);
    procedure Move;
    procedure Remove;
    procedure Sort;
    property Items;
    property Types[Index : Integer]: TJSONtype; {r}
    property Nulls[Index : Integer]: Boolean; {r}
    property Integers[Index : Integer]: Integer; {rw}
    property Int64s[Index : Integer]: Int64; {rw}
    property LargeInts[Index : Integer]: TJSONLargeInt; {rw}
    property QWords[Index : Integer]: QWord; {rw}
    property UnicodeStrings[Index : Integer]: TJSONUnicodeStringType; {rw}
    property Strings[Index : Integer]: TJSONStringType; {rw}
    property Floats[Index : Integer]: TJSONFloat; {rw}
    property Booleans[Index : Integer]: Boolean; {rw}
    property Arrays[Index : Integer]: TJSONArray; {rw}
    property Objects[Index : Integer]: TJSONObject; {rw}
  end;

Description

TJSONArrayClass is the class type of TJSONArray. It is used in the factory methods.

Properties

Member Visibility Description
Arrays public Get or set elements as JSON array values.
Booleans public Get or set elements as boolean values.
Floats public Get or set elements as floating-point numerical values.
Int64s public Get or set elements as Int64 values.
Integers public Get or set elements as integer values.
Items read only public Indexed access to the values in the array.
LargeInts public Get or set elements as LargeInt values.
Nulls read only public Check which elements are null.
Objects public Get or set elements as JSON object values.
QWords public Get or set elements as QWord values.
Strings public Get or set elements as string values.
Types read only public JSON types of elements in the array.
UnicodeStrings public Get or set elements as Unicode string values.
See all Properties

Methods

Member Visibility Description
Add public Add a JSON value to the array.
Clear public Clear the array.
Clone public Clone the JSON array.
Create public Create a new instance of JSON array data.
Delete public Delete an element from the list by index.
Destroy public Free the JSON array.
Exchange public Exchange 2 elements in the list.
Extract public Extract an element from the array.
GetEnumerator public Get an array enumerator.
IndexOf public Return index of JSONData instance in array.
Insert public Insert an element in the array.
Iterate public Iterate over all elements in the array.
JSONType public native JSON data type.
Move public Move a value from one location to another.
Remove public Remove an element from the list.
Sort public Sort the items in the array.
See all Methods

See also

Name Description
TJSONArray Class of TJSONArray.
SetJSONInstanceType JSON factory: Set the JSONData class types to use.
GetJSONInstanceType JSON factory: Get the JSONData class types to use.