{'type': 'boolean'}
975031
def _validate_readonly(self, readonly, field, value):
        
        if readonly:
            if not self._is_normalized:
                self._error(field, errors.READONLY_FIELD)
            # If the document was normalized (and therefore already been
            # checked for readonly fields), we still have to return True
            # if an error was filed.
            has_error = errors.READONLY_FIELD in \
                self.document_error_tree.fetch_errors_from(
                    self.document_path + (field,))
            if self._is_normalized and has_error:
                self._drop_remaining_rules()
163889
protected void onBoolean(Boolean bool, String fieldName, JsonParser jp) {
		log.trace(fieldName + " " + bool);
	}
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))
1352263
def boolean(name=None):
    

    if name is None:
        name = 'Boolean Field'

    # Basic field
    field = pp.Regex('[YN]')

    # Parse action
    field.setParseAction(lambda b: _to_boolean(b[0]))

    # Name
    field.setName(name)

    return field
241041
function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_dropdown",
          "name": "BOOL",
          "options": [
            [Blockly.Msg.LOGIC_BOOLEAN_TRUE, "TRUE"],
            [Blockly.Msg.LOGIC_BOOLEAN_FALSE, "FALSE"]
          ]
        }
      ],
      "output": "Boolean",
      "colour": Blockly.Blocks.logic.HUE,
      "tooltip": Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP,
      "helpUrl": Blockly.Msg.LOGIC_BOOLEAN_HELPURL
    });
  }
153421
private Boolean _convertToBoolean(Object value)
    {
        Boolean booleanValue;
        if (value instanceof Boolean)
        {
            booleanValue = (Boolean) value;
        }
        else
        {
            booleanValue = Boolean.parseBoolean(value.toString());
        }
        return booleanValue;
    }
121198
private void toBoolean(boolean box) {
        if (box && mTarget >= 0x00010004) {
            // Call the new valueOf method.
            invokeStatic("java.lang.Boolean", "valueOf",
                         TypeDesc.BOOLEAN.toObjectType(),
                         new TypeDesc[] {TypeDesc.BOOLEAN});
            return;
        }

        Label nonZero = createLabel();
        Label done = createLabel();
        ifZeroComparisonBranch(nonZero, "!=");
        if (box) {
            TypeDesc newType = TypeDesc.BOOLEAN.toObjectType();
            loadStaticField(newType.getRootName(), "FALSE", newType);
            branch(done);
            nonZero.setLocation();
            loadStaticField(newType.getRootName(), "TRUE", newType);
        } else {
            loadConstant(false);
            branch(done);
            nonZero.setLocation();
            loadConstant(true);
        }
        done.setLocation();
    }
1027314
public Boolean getBoolean(int index, boolean strict) throws JsonException {
        JsonElement el = get(index);
        Boolean res = null;
        if (strict && !el.isBoolean()) {
            throw Util.typeMismatch(index, el, "boolean", true);
        }
        if (el.isBoolean()) {
            res = el.asBoolean();
        }
        if (el.isString()) {
            res = Util.toBoolean(el.asString());
        }
        if (res == null)
            throw Util.typeMismatch(index, el, "boolean", strict);
        return res;
    }
560816
def get_as_boolean(self, key):
        
        value = self.get(key)
        return BooleanConverter.to_boolean(value)
1258254
def _validate_bool(value):
    
    if isinstance(value, six.text_type):
        if value.strip().lower() == 'true':
            value = True
        elif value.strip().lower() == 'false':
            value = False
        else:
            raise ValueError('"{}" must be a boolean ("True" or "False")'.format(value))

    if not isinstance(value, bool):
        raise ValueError('"{}" is not a boolean value.'.format(value))

    return value
868205
def bool_str(string):
    """'"""
    if string not in BOOL_STRS:
        raise ValueError('Invalid boolean string: "{}"'.format(string))
    return True if string == 'true' else False
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)
319194
function TypedBoolean (config) {
    const boolean = this;

    // define properties
    Object.defineProperties(boolean, {

        strict: {
            /**
             * @property
             * @name TypedBoolean#strict
             * @type {boolean}
             */
            value: config.hasOwnProperty('strict') ? !!config.strict : false,
            writable: false
        }

    });

    return boolean;
}
725969
function _bool(val) {
    if (arguments.length === 1) {
      this._boolFlag = val;
      return this;
    }
    var ret = this._boolFlag;
    this._boolFlag = 'and';
    return ret;
  }
3925
def as_boolean(value)
      res = false

      if value
        if value.is_a?(TrueClass) || value.is_a?(FalseClass)
          res = value
        elsif value.is_a?(Fixnum)
          res = value != 0
        elsif value.respond_to?(:to_s)
          value = value.to_s.downcase

          res = (value == 't' || value == 'true')
        end
      end

      res
    end
658953
function BooleanField(type, options) {
  Field.call(this, type, options);

  this.name = options.name;
  this.named = options.named;

  this.element = util.createElement(this.document, 'input');
  this.element.type = 'checkbox';
  this.element.id = 'gcliForm' + this.name;

  this.onInputChange = this.onInputChange.bind(this);
  this.element.addEventListener('change', this.onInputChange, false);

  this.onFieldChange = util.createEvent('BooleanField.onFieldChange');
}
454406
private Boolean readOptionalBoolean(JSONValue val) {

        JSONBoolean b = null == val ? null : val.isBoolean();
        if (b != null) {
            return Boolean.valueOf(b.booleanValue());
        }
        return null;
    }