*Asserts the field as JSON boolean.*

        The field consists of parts separated by spaces, the parts being
        object property names or array indices starting from 0, and the root
        being the instance created by the last request (see `Output` for it).

        For asserting deeply nested properties or multiple objects at once,
        [http://goessner.net/articles/JsonPath|JSONPath] can be used with
        [https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], the root being the response body.

        *Value*

        If given, the property value is validated in addition to the type.

        *Validations*

        The JSON Schema validation keywords
        [https://json-schema.org/understanding-json-schema/reference/generic.html|common for all types]
        can be used. Validations are optional but update the schema of
        the property (more accurate) if given.
        `Output Schema` can be used for the current schema of the field.

        The keyword will fail if any of the given validations fail.
        Given validations can be skipped altogether by adding ``skip=true``.
        When skipped, the schema is updated but the validations are not ran.
        Skip is intented mainly for debugging the updated schema before aborting.

        *Examples*

        | `PUT`  | /users/1 | { "verified_email": true } | | | # https://jsonplaceholder.typicode.com/users/1 |
        | `Boolean` | response body verified_email | | | | # value is optional |
        | `Boolean` | response body verified_email | true |
        | `Boolean` | response body verified_email | ${True} | | | # same as above |
        | `Boolean` | $.verified_email | true | | | # JSONPath alternative |
        | `Boolean` | $.verified_email | true | enum=[1, "1"] | skip=true | # would pass |

def boolean(self, field, value=None, **validations):
        """*Asserts the field as JSON boolean.*

        The field consists of parts separated by spaces, the parts being
        object property names or array indices starting from 0, and the root
        being the instance created by the last request (see `Output` for it).

        For asserting deeply nested properties or multiple objects at once,
        [http://goessner.net/articles/JsonPath|JSONPath] can be used with
        [https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], the root being the response body.

        *Value*

        If given, the property value is validated in addition to the type.

        *Validations*

        The JSON Schema validation keywords
        [https://json-schema.org/understanding-json-schema/reference/generic.html|common for all types]
        can be used. Validations are optional but update the schema of
        the property (more accurate) if given.
        `Output Schema` can be used for the current schema of the field.

        The keyword will fail if any of the given validations fail.
        Given validations can be skipped altogether by adding ``skip=true``.
        When skipped, the schema is updated but the validations are not ran.
        Skip is intented mainly for debugging the updated schema before aborting.

        *Examples*

        | `PUT`  | /users/1 | { "verified_email": true } | | | # https://jsonplaceholder.typicode.com/users/1 |
        | `Boolean` | response body verified_email | | | | # value is optional |
        | `Boolean` | response body verified_email | true |
        | `Boolean` | response body verified_email | ${True} | | | # same as above |
        | `Boolean` | $.verified_email | true | | | # JSONPath alternative |
        | `Boolean` | $.verified_email | true | enum=[1, "1"] | skip=true | # would pass |
        """
        values = []
        for found in self._find_by_field(field):
            reality = found["reality"]
            schema = {"type": "boolean"}
            if value is not None:
                schema["enum"] = [self._input_boolean(value)]
            elif self._should_add_examples():
                schema["examples"] = [reality]
            skip = self._input_boolean(validations.pop("skip", False))
            if not skip:
                self._assert_schema(schema, reality)
            values.append(reality)
        return values