Reference
boolean¶
The boolean type matches only two special values: true and false.
Note that values that evaluate to true or false, such as 1 and 0,
are not accepted by the schema.
Language-specific info:
Python
Ruby
In Python, "boolean" is analogous to bool.  Note that in JSON,
true and false are lower case, whereas in Python they are
capitalized (True and False).
1
{ "type": "boolean" }data
1
truedata
1
falsedata
1
"true"Values that evaluate to true or false are still not accepted by the schema:
data
1
0Need help?
Learning JSON Schema is often confusing, but don't worry, we are here to help! You can start a thread on GitHub Discussions, connect with us on Slack, or join our live Office Hours.
We'd love to help!! ❤️