---
name: "bson_json_reader_new"
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_json_reader_new"
---

# bson\_json\_reader\_new(3)

## SYNOPSIS

```
bson_json_reader_t *
bson_json_reader_new (void *data,
                      bson_json_reader_cb cb,
                      bson_json_destroy_cb dcb,
                      bool allow_multiple,
                      size_t buf_size);
```

## PARAMETERS

- •

  **data**: A user-defined pointer.

- •

  **cb**: A bson\_json\_reader\_cb.

- •

  **dcb**: A bson\_json\_destroy\_cb.

- •

  **allow\_multiple**: Unused.

- •

  **buf\_size**: A size\_t containing the requested internal buffer size.

## DESCRIPTION

Creates a new bson\_json\_reader\_t that can read from an arbitrary data source in a streaming fashion.

The **allow\_multiple** parameter is unused.

## RETURNS

A newly allocated bson\_json\_reader\_t that should be freed with bson\_json\_reader\_destroy().

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
