beetlebug▾
/

ztcl::json bool

Writes a JSON true or false.

ztcl::json bool B

Description

Gives true or false from B, a boolean of Tcl such as 1, yes, or off.

Arguments

ArgumentTypeDefaultDescription
BbooleanrequiredThe boolean.

Returns

true or false.

Examples

Each example of this page runs after package require ztcl::json.

% ztcl::json bool yes
true

Errors

% ztcl::json bool maybe
expected a boolean but got "maybe"
-errorcode ZT JSON VALUE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also