Booleans
Boolean values — true and false, in compact and verbose forms.
A boolean is a logical value, either true or false. Booleans are scalar values used for flags, binary states, and conditions.
Each value has a compact and a verbose form, letting you trade brevity for explicitness.
Syntax
boolean = compactBoolean | verboseBoolean
compactBoolean = "T" | "F"
verboseBoolean = "true" | "false"Structural elements
T
Compact true
true in compact form
F
Compact false
false in compact form
true
Verbose true
the verbose true keyword
false
Verbose false
the verbose false keyword
Valid forms
The compact and verbose forms are equivalent; the compact form is recommended for terse data.
---
T, F, true, falseNot a boolean
Boolean keywords are case-sensitive and spelled exactly. Any other token is not an error — it is parsed as a different value type, so it is not a boolean:
Under a
boolschema, a non-boolean value fails validation withexpected-boolean. Without a schema, the values above are simply kept as their parsed type (string or number).
See Also
Value Representations — all value types
Nulls — the absence of a value
Bool — the boolean schema type
Last updated
Was this helpful?
