---
name: "bson_json_reader_new_from_file"
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_from_file"
---

# bson\_json\_reader\_new\_from\_file(3)

## SYNOPSIS

```
bson_json_reader_t *
bson_json_reader_new_from_file (const char *filename, bson_error_t *error);
```

## PARAMETERS

- •

  **filename**: A file-name in the system file-name encoding.

- •

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

## DESCRIPTION

Creates a new bson\_json\_reader\_t using the underlying file found at **filename**.

## ERRORS

Errors are propagated via **error**.

## RETURNS

A newly allocated bson\_json\_reader\_t if successful, otherwise NULL and error is set.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
