BSON_COUNT_KEYS(3)

πŸ’… BSON_COUNT_KEYS(3) πŸ’…

okay so bestie, welcome to bson_count_keys, part of the libbson crew (manual section 3, if you're keeping track πŸŽ€). she's a tiny little function with one job and honestly? she ate. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

uint32_t
bson_count_keys (const bson_t *bson);

that's it. that's the whole vibe. one function, one arg, one uint32_t coming back at you πŸ”₯


🌸 PARAMETERS 🌸

  • bson β€” a bson_t. that's the whole description, no cap. hand her a bson_t and she's happy πŸ’–

πŸ’« DESCRIPTION πŸ’«

so like, bson_count_keys() shall count the number of elements within bson. that's her whole personality and honestly? iconic. she counts the elements. she returns the count. main character energy, zero drama πŸ§šβ€β™€οΈβœ¨

no weird side quests, no "what if bson is NULL" lore in here β€” the manpage gives you exactly one sentence and I'm not about to invent extra facts for you, iykyk πŸ™ˆ


πŸ‘‘ RETURNS πŸ‘‘

a positive integer or zero. yep β€” that's the range. 0 is fully valid, so don't come at her with "but it returned nothing" energy, zero is literally a whole answer πŸ’€πŸ’œ


🫢 AUTHOR 🫢

MongoDB, Inc β€” the ones who brought you this whole thing πŸ†


2009-present, MongoDB, Inc. β€” all the years, all the rights, periodt πŸ’…


πŸ“ one last thing πŸ“

this page is from libbson 2.5.6, dated Oct 09, 2026 β€” so like, screenshot the version number and the date together, mwah, bye bestie, go count some keys πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from