general.boolean.invalid
Severity: error
The value provided is not a valid boolean. The field expects either true or false, but received a different value.
This error is triggered by the language server when a value that should be a boolean fails boolean validation. Common causes include:
- Providing a string like
"true"or"yes"instead of the boolean literaltrue - Providing a number (e.g.,
1or0) instead oftrueorfalse - Providing
nullwhere a boolean is required
The following JSON triggers the error because the value is a string instead of a boolean:
Or using a number instead of boolean:
{
"minecraft:breathable": {
"breathes_air": 1 // Invalid — should be true or false
}
}Use the boolean literals true or false (without quotes):
{
"minecraft:breathable": {
"breathes_air": true
}
}Valid boolean values are true and false.
{ "minecraft:breathable": { "breathes_air": "true" // Invalid — should be boolean true, not string "true" } }