bson_json_opts_t(3)

bson_json_opts_t3

Usage

#include <bson/bson.h>
typedef struct _bson_json_opts_t bson_json_opts_t;
bson_json_opts_t *
bson_json_opts_new (bson_json_mode_t mode, int32_t max_len);
void
bson_json_opts_destroy (bson_json_opts_t *opts);

BSON to JSON encoding options

Overview

The bson_json_opts_t structure contains options for encoding BSON into MongoDB Extended JSON.

The mode member is a bson_json_mode_t defining the encoding mode.

The max_len member holds a maximum length for the resulting JSON string. Encoding will stop once the serialised string has reached this length. To encode the full BSON document, BSON_MAX_LEN_UNLIMITED can be used.

SEE ALSO:

bson_as_json_with_opts()

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

MongoDB, Inc

From libbson-doc 1.30.4-1+deb13u3 in Debian 13 (Trixie). Parsed by carta from the page's man source.