System.JSON.TJSONBool.AsTValue

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

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

C++

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

Propriétés

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


Description

Remplit l'instance AValue de TValue avec cette valeur booléenne JSON encodée selon le type spécifié. AsTValue renvoie True si le type spécifié est pris en charge ou False dans le cas contraire.

Les types TTypeData pris en charge sont :

Types pris en charge Description

tkEnumeration

Remplit AValue sous la forme d'un booléen.

tkInteger
tkInt64
tkFloat

Remplit AValue sous la forme d'un entier. AsTValue écrit 1 si le booléen JSON vaut True ou 0 s'il vaut False.

tkString
tkLString
tkWString
tkUString

Remplit AValue sous la forme d'une chaîne. AsTValue écrit "true" si le booléen JSON vaut True ou "false" s'il vaut False.

tkClass

Remplit AValue tel qu'il est.

Voir aussi