### Method

# Json Object get_string_member_with_default

#### Declaration [src]

    const char*
    json_object_get_string_member_with_default (
      JsonObject* object,
      const char* member_name,
      const char* default_value
    )

#### Description [src]

Convenience function that retrieves the string 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.

Available since: | 1.6

#### Parameters

`member_name` | `const char*`
| The name of the `object` member.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`default_value` | `const char*`
| The value to return if `member_name` is not valid.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `const char*`
| The string value of the object’s member, or the given default.
| The data is owned by the instance.
| The value is a NUL terminated UTF-8 string.