BSON_JSON_MODE_T(3)

πŸ’… BSON_JSON_MODE_T(3) πŸ’…

ok so this is a page from the libbson manual, and honestly? it's a short one, bestie. we're talking about the BSON JSON encoding mode enumeration ✨ β€” yes that's the whole name line, slay.


✨ SYNOPSIS ✨

like, here's the literal vibe:

#include <bson/bson.h>

typedef enum {
   BSON_JSON_MODE_LEGACY,
   BSON_JSON_MODE_CANONICAL,
   BSON_JSON_MODE_RELAXED,
} bson_json_mode_t;

copy it exactly bestie, no typos, we don't do that here πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bson_json_mode_t is this enum and it's literally a little menu of modes πŸ“ β€” it contains all the available modes for encoding BSON into MongoDB Extended JSON. that's it. that's the whole job. main character energy, no notes πŸ’…

and the three options on the menu are, in order:

  • BSON_JSON_MODE_LEGACY β€” the legacy one 🌸
  • BSON_JSON_MODE_CANONICAL β€” the canonical one πŸ‘‘
  • BSON_JSON_MODE_RELAXED β€” the relaxed one 🧚

(that's the entire enum, she's short and iconic, periodt ✨)

SEE ALSO: πŸ”₯ bson_as_json_with_opts() β€” go read that one next, iykyk 🫢

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” yes, the whole company. iconic of them honestly 😭


2009-present, MongoDB, Inc. β€” like, a long time. respect πŸ’–


and that's the tea, bestie πŸ¦‹ this masterpiece is from libbson version 2.5.6, dated Oct 09, 2026 β€” go forth and encode responsibly, mwah πŸ’‹βœ¨πŸŒˆ

πŸ“¦ where this page comes from