SYNOPSIS

#include <bson.h>

bool
bson_iter_as_bool (const bson_iter_t *iter);

DESCRIPTION

The bson_iter_as_bool() function shall return TRUE if the contents of the current element should be considered non-FALSE. bson_iter_as_bool() currently knows how to determine a boolean value from the following types:

BSON_TYPE_BOOL
BSON_TYPE_DOUBLE
BSON_TYPE_INT32
BSON_TYPE_INT64
BSON_TYPE_NULL
BSON_TYPE_UNDEFINED
BSON_TYPE_UTF8

BSON_TYPE_UTF8 will always equate to TRUE.

RETURN VALUE

TRUE if the element contains a non-zero value.

ERRORS

No errors are defined.

SEE ALSO

AUTHORS

This page was written by MongoDB, Inc.