Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%JSON_ObjectHasField function


Function

Check if there exists a field with a given name in the JSON object.

Declaration


Blok kódu
languageesl
themeConfluence
BOOL %JSON_ObjectHasField(
    INT in handle, 
    TEXT in field
 )


Parameters


handleHandle to parent JSON object.
fieldField name


Return value

@TRUE if given field exists in JSON object, else @FALSE.

Description

Function check checks if there exists a field with a given name in the JSON object.

Exception is thrown if handle to JSON object is invalid.

Example


Blok kódu
languageesl
themeRDark
 INT _obj
 _obj := %JSON_ObjectFromString(ModuleInfo)
 
 BOOL _hasInfo
 _hasInfo := %JSON_ObjectHasField(_obj, "client_info")

 %JSON_FreeObjectHandle(_obj)