BooleanValue (Json function)

From m204wiki
Revision as of 15:56, 18 February 2015 by Alex (talk | contribs) (→‎Usage notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Get boolean value of JSON object (Json class)

[Introduced in Model 204 7.6]


This function returns the boolean value of a Json object of the boolean type.

Syntax

%boolean = json:BooleanValue Throws InvalidJsonType

Syntax terms

%booleanBoolean value
Json Json object, which must either be the boolean type or be Null.

Usage notes

  • If the Json object is not null and doesn't have the boolean type, an InvalidJsonType exception is thrown.
  • If the Json object is null, the boolean value is also null.

Examples

The following example does processing base on the value of a Json object called %rushJob:

%rushJob is json ... if %rushJob:booleanValue then ... end if

See also