SYNOPSIS

#include <bson.h>

bool
bson_iter_recurse (const bson_iter_t *iter,
                   bson_iter_t       *child);

DESCRIPTION

The bson_iter_recurse() function shall initialize child using the embedded document or array currently observed by iter.

If there was a failure to initialize the iter, FALSE is returned and both iter and child should be considered invalid.

This should only be called when observing an element of type BSON_TYPE_ARRAY or BSON_TYPE_DOCUMENT.

RETURN VALUE

TRUE if child has been intialized. Otherwise, both child and iter should be considered invalid.

ERRORS

FALSE could be returned if the sub-document length does not match what is expected by the parent document. This could happen if the document is corrupt or malicious.

SEE ALSO

AUTHORS

This page was written by MongoDB, Inc.