System.JSON.TJSONBool.AsTValue

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AsTValue(ATypeInfo: PTypeInfo; var AValue: TValue): Boolean; override;

C++

virtual bool __fastcall AsTValue(System::Typinfo::PTypeInfo ATypeInfo, System::Rtti::TValue &AValue);

Properties

Type Visibility Source Unit Parent
function protected
System.JSON.pas
System.JSON.hpp
System.JSON TJSONBool

Description

Fills the specified AValue instance of TValue with the value of this JSON boolean value, encoded using the specified type. AsTValue returns True if the specified type is supported or False otherwise.

Supported TTypeData types are:

Supported Types Description

tkEnumeration

Fills AValue as a boolean.

tkInteger
tkInt64
tkFloat

Fills AValue as an integer. AsTValue writes 1 if the JSON boolean is True or 0 if False.

tkString
tkLString
tkWString
tkUString

Fills AValue as a string. AsTValue writes "true" if the JSON boolean is True or "false" if False.

tkClass

Fills AValue as is.

See Also