BSON_WRITER_BEGIN(3)

✨ BSON_WRITER_BEGIN(3) — bestie, let’s start a document ✨

Okay so this is the BSON_WRITER_BEGIN(3) page from libbson, and it’s lowkey the “new document loading…” moment for your BSON writer. Let’s get into it, fr fr.

📜 SYNOPSIS

bool
bson_writer_begin (bson_writer_t *writer, bson_t **bson);

🎀 PARAMETERS

  • writer — A bson_writer_t. That’s your writer bestie, the main character here.
  • bson — A bson_t. This is the structure you get to use for the new document.

💅 DESCRIPTION

Begins writing a new document. The caller may use the bson structure to write out a new BSON document. When completed, the caller must call either bson_writer_end() or bson_writer_rollback().

🫶 Bestie, do not skip that last part. You gotta close it out with either bson_writer_end() or bson_writer_rollback(). No cap.

🔥 RETURNS

true if there was space in the underlying buffers to begin the document.

👑 AUTHOR

MongoDB, Inc

2009-present, MongoDB, Inc.


💖 That’s the whole page, bestie. This one comes from libbson 2.5.6, dated Oct 09, 2026. Mwah! 💖

📦 where this page comes from