BSON_JSON_OPTS_NEW(3)
bestie, welcome to the BSON_JSON_OPTS_NEW(3) page from the libbson manual π¦β¨ lowkey itβs a tiny one, but itβs giving βallocator main character energy,β and weβre obsessed. Itβs all about making a brand-new bson_json_opts_t, no cap. π
β¨ SYNOPSIS β¨
bson_json_opts_t *
bson_json_opts_new (bson_json_mode_t mode, int32_t max_len);
π PARAMETERS π
modeβ abson_json_mode_t, bestie. The encoding-mode of it all.max_lenβ anint32_t. This is the length parameter in question.
π DESCRIPTION π
okay so the bson_json_opts_new() function shall create a new bson_json_opts_t using the mode and length supplied. The mode member is a bson_json_mode_t defining the encoding mode. Slay. π
The max_len member holds a maximum length for the resulting JSON string. Encoding will stop once the serialised string has reached this length β literally, it hits the limit and says βthatβs it, bestie.β To encode the full BSON document, BSON_MAX_LEN_UNLIMITED can be used. No cap, fr fr. π
π«Ά RETURNS π«Ά
A newly allocated bson_json_opts_t. Thatβs the whole return, and honestly? iconic. π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
this page is from the libbson source, version 2.5.6, dated Oct 09, 2026 β mwah, besties ππ
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms