JSON_ObjectIsValue
%JSON_ObjectIsValue function
Function
Checks if there is a value in a given field in the JSON object.
Declaration
BOOL %JSON_ObjectIsValue(
INT in handle,
TEXT in field
)Parameters
handle | Handle to parent JSON object. |
field | Field name |
Return value
@TRUE if in given field is value of type BOOL, INT, REAL, TEXT or invalid value, else @FALSE.
Description
Function checks if there is a value of type BOOL, INT, REAL, TEXT or invalid value in a given field in the JSON object.
Exception is thrown if handle to JSON object is invalid or field does not exists.
Example
INT _obj
_obj := %JSON_ObjectFromString('{"Count":5}')
BOOL _is_value
_is_value := %JSON_ObjectIsValue(_obj, "Count")
%JSON_FreeObjectHandle(_obj)