BSON_JSON_READER_NEW_FROM_FILE(3)

πŸ’… BSON_JSON_READER_NEW_FROM_FILE πŸ’…

ok so bestie, welcome to BSON_JSON_READER_NEW_FROM_FILE(3) β€” that's the libbson manual, section 3, and this page is literally all about one tiny little function that opens a file and hands you a reader. iconic behavior, no cap. πŸŽ€


✨ SYNOPSIS ✨

bson_json_reader_t *
bson_json_reader_new_from_file (const char *filename, bson_error_t *error);

yeah that's the whole thing. two args, returns a pointer. slay. πŸ¦‹


🌸 PARAMETERS 🌸

  • filename β€” a file name, and it's gotta be in the system file-name encoding, okay? like, the encoding your OS actually uses for paths. don't come at it with something weird. πŸ™ˆ
  • error β€” a bson_error_t. this is where the drama gets reported if things go sideways. πŸ’€

πŸ’– DESCRIPTION πŸ’–

Creates a new bson_json_reader_t using the underlying file found at filename.

that's it, that's the whole vibe. it's giving "open file, make reader". main character energy fr fr. 🌈


πŸ”₯ ERRORS πŸ”₯

Errors are propagated via error. so like, if something goes wrong, it's not gonna ghost you β€” it tells you through that bson_error_t you passed in. 🫢


⭐ RETURNS ⭐

A newly allocated bson_json_reader_t if successful β€” cute, fresh, yours to keep (and to free, iykyk). otherwise NULL, and error is set. so like, always check, bestie, please. 😭


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons themselves. πŸ’œ


2009-present, MongoDB, Inc.


ok that's the page!! go forth and read some JSON, you absolute legend πŸ“βœ¨

libbson version 2.5.6, dated Oct 09, 2026 β€” mwah, catch you in the next manpage, bestie πŸ’…πŸ¦‹πŸ’–

πŸ“¦ where this page comes from