True (Json function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
Line 12: Line 12:
<ul>
<ul>
<li>The True method is equivalent to [[Boolean (Json function)|Boolean(true)]].</li>
<li>The True method is equivalent to [[Boolean (Json function)|Boolean(true)]].</li>
<li>As with all virtual or true constructors, it is usually not necessary to specify the <code>%(json):</code> before the True method. That is <code>%json = %(json):true</code> is equivalent to <code>%json = true</code>.</li>
</ul>
</ul>
==Examples==
==Examples==
The following creates a boolean Json object with a value of false:
The following creates a boolean Json object with a value of false:

Latest revision as of 18:39, 18 February 2015

Create a true Boolean JSON object (Json class)

[Introduced in Model 204 7.6]

This function creates a boolean Json object with a value of true.

Syntax

%json = [%(Json):]True

Syntax terms

%jsonJson object
[%(Json):] The optional class name in parentheses denotes a virtual constructor.

Usage notes

  • The True method is equivalent to Boolean(true).
  • As with all virtual or true constructors, it is usually not necessary to specify the %(json): before the True method. That is %json = %(json):true is equivalent to %json = true.

Examples

The following creates a boolean Json object with a value of false:

b %json is object json %json = true printText {~=%json} end

It prints:

%json=true

See also