DOKK / manpages / debian 11 / libbson-doc / bson_iter_recurse.3.en
BSON_ITER_RECURSE(3) libbson BSON_ITER_RECURSE(3)

bson_iter_recurse - bson_iter_recurse()

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


  • iter: A bson_iter_t.
  • child: A bson_iter_t.

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.

If iter observes an element of type BSON_TYPE_ARRAY or BSON_TYPE_DOCUMENT, then child is initialized and the function returns true. Otherwise, the function returns false and child is invalid.

MongoDB, Inc

2017-present, MongoDB, Inc

June 4, 2021 1.17.6