BooleanValue (Json function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
Line 13: Line 13:
<ul>
<ul>
<li>If the Json object is not null and doesn't have the boolean type, an InvalidJsonType exception is thrown.</li>
<li>If the Json object is not null and doesn't have the boolean type, an InvalidJsonType exception is thrown.</li>
<li>If the Json object is null, the boolean value is also null.</p>
<li>If the Json object is null, the boolean value is also null.</li>
</ul>
</ul>
==Examples==
==Examples==
The following example does processing base on the value of a Json object called %rushJob:
The following example does processing base on the value of a Json object called %rushJob:

Latest revision as of 15:56, 18 February 2015

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