JSON Schema – how do I specify that a boolean value must be false?

Use the enum keyword:

{
    "properties": {
        "some_flag": { "enum": [ false ] }
    }
}

This keyword is designed for such cases. The list of JSON values in an enum is the list of possible values for the currently validated value. Here, there is only one possible value: JSON boolean false.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)