{'type': 'boolean'}
355124
def _validate_nullable(self, nullable, field, value):
        
        if value is None:
            if not nullable:
                self._error(field, errors.NOT_NULLABLE)
            self._drop_remaining_rules(
                'allowed',
                'empty',
                'forbidden',
                'items',
                'keysrules',
                'min',
                'max',
                'minlength',
                'maxlength',
                'regex',
                'schema',
                'type',
                'valuesrules',
            )
689335
def parse_bool(cls, value, default=None):
        """"""
        if value is None:
            return default

        elif isinstance(value, bool):
            return value

        elif isinstance(value, str):
            if value == 'True':
                return True
            elif value == 'False':
                return False

        raise Exception("Value %s is not boolean." % value)
1150276
@NonNull
    @Override
    public MutableDictionary setBoolean(@NonNull String key, boolean value) {
        return setValue(key, value);
    }
816116
def parse_boolean(value):
    

    if value is None:
        return None

    if isinstance(value, bool):
        return value

    if isinstance(value, string_types):
        value = value.lower()
        if value == 'false':
            return False
        if value == 'true':
            return True

    raise ValueError("Could not convert value to boolean: {}".format(value))
1125157
public PactDslJsonArray booleanType(Boolean example) {
        body.put(example);
        matchers.addRule(rootPath + appendArrayIndex(0), TypeMatcher.INSTANCE);
        return this;
    }
221689
def is_boolean(node):
    """"""
    return any([
        isinstance(node, ast.Name)
        and node.id in ('True', 'False'),
        hasattr(ast, 'NameConstant')  # Support for Python 3 NameConstant
        and isinstance(node, getattr(ast, 'NameConstant'))  # screw you pylint!
        and str(node.value) in ('True', 'False')
    ])
941923
function boolOrFn(val, args) {
    if (typeof val == TYPE_FUNCTION) {
        return val.apply(args ? args[0] || undefined : undefined, args);
    }
    return val;
}
1180123
def boolean(text):
    

    tmp = text.lower()
    if tmp.isdigit():
        return bool(int(tmp))
    elif tmp in ('t', 'true', 'on', 'yes'):
        return True
    elif tmp in ('f', 'false', 'off', 'no'):
        return False

    raise ValueError("invalid Boolean value %r" % text)
656295
def bool(self, name):
        """"""
        self._assert_is_string(name)
        frame = self._next_frame()
        if len(frame) != 1:
            raise MessageParserError("Expected exacty 1 byte for boolean value")
        val = frame != b"\x00"
        self.results.__dict__[name] = val
        return self
374780
public static Boolean toBoolean(Object o) throws PageException {
	if (o instanceof Boolean) return (Boolean) o;
	return toBooleanValue(o) ? Boolean.TRUE : Boolean.FALSE;

    }
249940
def checkable(self, value):
        

        if value is not None:
            assert type(value) is bool, "'{0}' attribute: '{1}' type is not 'bool'!".format("checkable", value)
        self.__checkable = value
1221351
@Override
    public Boolean readBoolean() {
        return (currentDataType == AMF3.TYPE_BOOLEAN_TRUE) ? Boolean.TRUE : Boolean.FALSE;
    }
324905
def getBool(t):
    
    b = c_int()
    if PL_get_long(t, byref(b)):
        return bool(b.value)
    else:
        raise InvalidTypeError("bool")
255672
private static boolean isBooleanType(CtField field) throws NotFoundException {
        String typeName = field.getType().getName();
        return typeName.equals("java.lang.Boolean") || typeName.equals("boolean");
    }
963240
function isBoolean(o) {
    return o !== undefined && o !== null &&
          (typeof o === "boolean" || o.constructor === Boolean);
}
359090
def visit_Boolean(self, node):
        """"""
        if node.value == 'true':
            return Bool(True)
        elif node.value == 'false':
            return Bool(False)
682369
function isBool(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && typeof value !== 'boolean') {
        throw TypeException.unexpectedType(assertionTypes.IS_BOOL, value, '<boolean>', message, id);
    }
}