---
name: "bson_json_mode_t"
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_mode_t"
---

# bson\_json\_mode\_t(3)

BSON JSON encoding mode enumeration

## SYNOPSIS

```
#include <bson/bson.h>
typedef enum {
   BSON_JSON_MODE_LEGACY,
   BSON_JSON_MODE_CANONICAL,
   BSON_JSON_MODE_RELAXED,
} bson_json_mode_t;
```

## DESCRIPTION

The *bson\_json\_mode\_t* enumeration contains all available modes for encoding BSON into *MongoDB Extended JSON*.

**SEE ALSO:**

```
bson_as_json_with_opts()
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
