Json.Object.get_boolean_member_with_default

### Method

# Json Objectget_boolean_member_with_default

since: 1.6

#### Declaration [src]

    gboolean
    json_object_get_boolean_member_with_default (
      JsonObject* object,
      const char* member_name,
      gboolean default_value
    )

#### Description [src]

Convenience function that retrieves the boolean value stored in `member_name` of `object`.

If `member_name` does not exist, does not contain a scalar value, or contains `null`, then `default_value` is returned instead. If `member_name` contains a non-boolean, non-`null` scalar value, then whatever `json_node_get_boolean()` would return is returned.

Available since: 1.6

#### Parameters

`member_name`

  Type: `const char*`

  The name of the `object` member.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`default_value`

  Type: `gboolean`

  The value to return if `member_name` is not valid.

#### Return value

Type: `gboolean`

The boolean value of the object’s member, or the given default.