GetJsonType Method (XDATA)


9.8A

 

The GetJsonType method returns the JSON type of the current node. The method uses the following format:

 

[label]

{object}.GetJsonType

[GIVING {return}]

 

Where:

label
Optional. A Program Execution Label.
object
Required. An XDATA object.
return
Optional. A Numeric Variable that receives the JSON type value of the current node.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO flag is set if the {return} value is zero.

  2. The OVER flag is set TRUE if the JSON type value is too large to be stored in the {return} numeric variable.

  3. The EOS flag is always set FALSE.

  4. If the current node does not have a JSON type, the {return} value is zero.

  5. A JSON type only exists for the node types of DOM_ELEMENT_NODE, DOM_ATTRIBUTE_NODE, and DOM_TEXT_NODE. Therefore, this method should only be executed for these node types.

  6. The supported JSON types stored into the {return} variable are defined as follows:

  7.  

    Type

    Value

    JSON_TYPE_NONE

    0

    JSON_TYPE_OBJECT

    1

    JSON_TYPE_ARRAY

    2

    JSON_TYPE_INTEGER

    3

    JSON_TYPE_DOUBLE

    4

    JSON_TYPE_STRING

    5

    JSON_TYPE_BOOLEAN

    6

    JSON_TYPE_NULL

    7

 

 

See Also: XDATA, XDATA Methods, Method Syntax



PL/B Language Reference GetExtendedError Method (XDATA) GetLabel Method (XDATA)