[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Retrieve a value by name
Source position: fpjson.pp line 546
public function TJSONObject.Get( |
const AName: string |
):Variant; |
const AName: string; |
ADefault: TJSONFloat |
):TJSONFloat; |
const AName: string; |
ADefault: Integer |
):Integer; |
const AName: string; |
ADefault: Int64 |
):Int64; |
const AName: string; |
ADefault: QWord |
):QWord; |
const AName: string; |
ADefault: Boolean |
):Boolean; |
const AName: string; |
ADefault: TJSONStringType |
):TJSONStringType; |
const AName: string; |
ADefault: TJSONUnicodeStringType |
):TJSONUnicodeStringType; |
const AName: string; |
ADefault: TJSONArray |
):TJSONArray; |
const AName: string; |
ADefault: TJSONObject |
):TJSONObject; |
AName |
|
Name of the value to retrieve |
The requested value
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
AName |
|
Name of the value to retrieve |
ADefault |
|
Default value to return if no value is found or it has the wrong type. |
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.
Integers |
Int64s |
Booleans |
Floats |
Arrays |