[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'fpjson' (#fcl)

TJSONObject.Get

Retrieve a value by name

Declaration

Source position: fpjson.pp line 523

public function TJSONObject.Get(

  const AName: string

):Variant;

function TJSONObject.Get(

  const AName: string;

  ADefault: TJSONFloat

):TJSONFloat;

function TJSONObject.Get(

  const AName: string;

  ADefault: Integer

):Integer;

function TJSONObject.Get(

  const AName: string;

  ADefault: Int64

):Int64;

function TJSONObject.Get(

  const AName: string;

  ADefault: QWord

):QWord;

function TJSONObject.Get(

  const AName: string;

  ADefault: Boolean

):Boolean;

function TJSONObject.Get(

  const AName: string;

  ADefault: TJSONStringType

):TJSONStringType;

function TJSONObject.Get(

  const AName: string;

  ADefault: TJSONArray

):TJSONArray;

function TJSONObject.Get(

  const AName: string;

  ADefault: TJSONObject

):TJSONObject;

Arguments

AName

  

Name of the value to retrieve

Function result

The requested value

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Arguments

AName

  

Name of the value to retrieve

ADefault

  

Default value to return if no value is found or it has the wrong type.

Description

Get can be used to retrieve a value by name. If an element with name equal to AName exists, and its type corresponds to the type of the ADefault, then the value is returned. If no element element with the correct type exists, the ADefault value is returned.

If no default is specified, the value is returned as a variant type, or Null if no value was found.

The other value retrieval properties such as IntegersInt64s, Booleans, Strings, Floats, Arrays, Objects will raise an exception if the name is not found. The Get function does not raise an exception.

See also

Integers

Int64s

Booleans

Strings

Floats

Arrays

Objects


Documentation generated on: Nov 14 2015