BooleanValue (Json function): Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Template:Json:BooleanValue subtitle}} | {{Template:Json:BooleanValue subtitle}} | ||
This | This function returns the boolean value of a Json object of the boolean type. | ||
==Syntax== | ==Syntax== | ||
{{Template:Json:BooleanValue syntax}} | {{Template:Json:BooleanValue syntax}} | ||
Line 8: | Line 8: | ||
<tr><th>%boolean</th><td><var>Boolean</var> value</td></tr> | <tr><th>%boolean</th><td><var>Boolean</var> value</td></tr> | ||
<tr><th>Json</th> | <tr><th>Json</th> | ||
<td>Json object, which | <td>Json object, which must either be the boolean type or be <var>Null</var>.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<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 null, the boolean value is also null.</p> | |||
</ul> | |||
==Examples== | ==Examples== | ||
The following example does processing base on the value of a Json object called %rushJob: | |||
<p class="code">%rushJob is json | |||
... | |||
if %rushJob:booleanValue then | |||
... | |||
end if | |||
</p> | |||
==See also== | ==See also== | ||
{{Template:Json:BooleanValue footer}} | {{Template:Json:BooleanValue footer}} |
Revision as of 21:20, 17 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
%boolean | Boolean 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