Unit 'fpjson' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TJSONArray.Create

Create a new instance of JSON array data.

Declaration

Source position: fpjson.pp line 548

public constructor TJSONArray.Create; overload;

constructor TJSONArray.Create(

  const Elements: array of Const

); overload;

Arguments

Elements

  

Data to add to the array.

Description

Create creates a new JSON array instance, and initializes the data with Elements. The elements are converted to various TJSONData instances, instances of TJSONData are inserted in the array as-is.

The data type of the inserted objects is determined from the type of data passed to it, with a natural mapping. A Nil pointer will be inserted as a TJSONNull value.

Errors

If an invalid class or not recognized data type (pointer) is inserted in the elements array, an EConvertError exception will be raised.

See also

GetJSONInstanceType

  

JSON factory: Get the JSONData class types to use.


Documentation generated on: Nov 22 2024