---
name: "bson_json_reader_read"
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_read"
---

# bson\_json\_reader\_read(3)

## SYNOPSIS

```
int
bson_json_reader_read (bson_json_reader_t *reader,
                       bson_t *bson,
                       bson_error_t *error);
```

## PARAMETERS

- •

  **reader**: A *bson\_json\_reader\_t*.

- •

  **bson**: A *bson\_t*.

- •

  **error**: A *bson\_error\_t*.

## DESCRIPTION

Reads the next BSON document from the underlying JSON source.

## ERRORS

Errors are propagated via the **error** parameter.

## RETURNS

1 if successful and data was read. 0 if successful and no data was read. -1 if there was an error.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
