---
name: "bson_iter_visit_all"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_iter_visit_all"
---

# bson\_iter\_visit\_all(3)

## SYNOPSIS

```
bool
bson_iter_visit_all (bson_iter_t *iter,
                     const bson_visitor_t *visitor,
                     void *data);
```

## PARAMETERS

- •

  **iter**: A *bson\_iter\_t*.

- •

  **visitor**: A *bson\_visitor\_t*.

- •

  **data**: Optional data for **visitor**.

## DESCRIPTION

A convenience function to iterate all remaining fields of **iter** using the callback vtable provided by **visitor**.

## RETURNS

Returns true if visitation was prematurely stopped by a callback function. Returns false either because all elements were visited *or* due to corrupt BSON.

See *bson\_visitor\_t* for examples of how to set your own callbacks to provide information about the location of corrupt or unsupported BSON document entries.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
