From RAD Studio API Documentation
Jump to: navigation, search


function TryGetValue<T>(out AValue: T): Boolean; overload;
function TryGetValue<T>(const APath: string; out AValue: T): Boolean; overload;


template<typename T> bool __fastcall TryGetValue(/* out */ T &AValue)/* overload */;
template<typename T> bool __fastcall TryGetValue(const System::UnicodeString APath, /* out */ T &AValue)/* overload */;


Type Visibility Source Unit Parent
function public
System.JSON TJSONValue


Finds a TJSONValue object located at the specified APath JSON path, casts this JSON value as the T JSON type and fills AValue with the obtained JSON value. Returns True on success or False otherwise.

In the current version, TJSONValue implements the following functionality:

  • If the specified APath is empty or it is not specified, TryGetValue casts this TJSONValue instance as the T type and fills AValue with the obtained JSON value. TryGetValue returns True if cast to T succeed.
  • If not empty APath is specified, then TryGetValue returns False. AValue is not filled.

See Also