Package libbson-devel

Development files for libbson

https://github.com/mongodb/libbson

This package contains libraries and header files needed for developing
applications that use libbson.

Library Functions (Section 3)
bson_append_array
The bson_append_array(3) function shall append child to bson using the specified key. The type of the field will be an array, but it is the responsibility of...
bson_append_array_begin
The bson_append_array_begin(3) function shall begin appending an array field to bson MUST call bson_append_array_end(3)
bson_append_array_end
The bson_append_array_end(3) function shall complete the appending of an array field started with bson_append_array_begin(3) child is invalid after calling this...
bson_append_binary
The bson_append_binary(3) function shall append a new element to bson containing the binary data provided.
bson_append_bool
The bson_append_bool(3) function shall append a new element to bson containing the boolean provided.
bson_append_code
The bson_append_code(3) function shall append a new element to bson using the UTF‐8 encoded javascript provided. javascript must be a NULL terminated C string.
bson_append_code_with_scope
The bson_append_code_with_scope(3) function shall perform like bson_append_code(3) except it allows providing a scope to the javascript function in the form of...
bson_append_date_time
The bson_append_date_time(3) function shall append a new element to a bson document containing a date and time with no timezone information. value is assumed to...
bson_append_dbpointer
The dbpointer field type is DEPRECATED and should only be used when interacting with legacy systems.
bson_append_decimal128
The bson_append_decimal128(3) function shall append a new element to bson containing a Decimal 128.
bson_append_document
The bson_append_document(3) function shall append child to bson using the specified key. The type of the field will be a document.
bson_append_document_begin
The bson_append_document_begin(3) function shall begin appending a sub‐document to bson child to add fields to the sub‐document. When completed, call...
bson_append_document_end
The bson_append_document_end(3) function shall complete the appending of a document with bson_append_document_begin(3) child is invalid after calling this...
bson_append_double
The bson_append_double(3) function shall append a new element to a bson document of type double
bson_append_int32
The bson_append_int32(3) function shall append a new element to bson containing a 32‐bit signed integer.
bson_append_int64
The bson_append_int64(3) function shall append a new element to bson containing a 64‐bit signed integer.
bson_append_iter
TODO:
bson_append_maxkey
The bson_append_maxkey(3) function shall append an element of type BSON_TYPE_MAXKEY to a bson document. This is primarily used in queries and unlikely to be...
bson_append_minkey
The bson_append_minkey(3) function shall append an element of type BSON_TYPE_MINKEY to a bson document. This is primarily used in queries and unlikely to be...
bson_append_now_utc
The bson_append_now_utc(3) function is a helper to get the current date and time in UTC and append it to bson as a BSON_TYPE_DATE_TIME element. This function...
bson_append_null
The bson_append_null(3) function shall append a new element to bson of type BSON_TYPE_NULL.
bson_append_oid
The bson_append_oid(3) function shall append a new element to bson of type BSON_TYPE_OID. oid MUST be a pointer to a bson_oid_t
bson_append_regex
Appends a new field to bson of type BSON_TYPE_REGEX. regex should be the regex string. options should contain the options for the regex.
bson_append_symbol
Appends a new field to bson of type BSON_TYPE_SYMBOL. This BSON type is deprecated and should not be used in new code.
bson_append_timestamp
This function is not similar in functionality to bson_append_date_time(3) They are primarily used for intra‐MongoDB server communication. The...
bson_append_time_t
The bson_append_time_t(3) function is a helper that takes a time_t instead of milliseconds since the UNIX epoch.
bson_append_timeval
The bson_append_timeval(3) function is a helper that takes a _struct timeval_ instead of milliseconds since the UNIX epoch.
bson_append_undefined
The bson_append_undefined(3) function shall append a new element to bson of type BSON_TYPE_UNDEFINED. Undefined is common in Javascript. However, this element...
bson_append_utf8
The bson_append_utf8(3) function shall append a UTF‐8 encoded string to bson _value_ MUST be valid UTF‐8. Some UTF‐8 implementations allow for to be contained...
bson_append_value
Appends a new field to bson by determining the boxed type in value
bson_as_json
The bson_as_json(3) function shall encode bson as a JSON encoded UTF‐8 string. The caller is responsible for freeing the resulting UTF‐8 encoded string by...
bson_check_version
Check at runtime if this release of libbson meets a required version.
bson_compare
The bson_compare(3) function shall compare two bson documents for equality. This can be useful in conjunction with _qsort()_. If equal, 0 is returned. NOTE
bson_concat
The bson_concat(3) function shall append the contents of src to dst
bson_context_destroy
The bson_context_destroy(3) function shall release all resources associated with context This should be called when you are no longer using a bson_context_t...
bson_context_get_default
None
bson_context_new
Creates a new bson_context_t bson_context_get_default(3) serves most use‐cases.
bson_context_t
The bson_context_t structure is context for generation of BSON Object IDs. This context allows for specialized overriding of how ObjectIDs are generated based...
bson_copy
The bson_copy(3) function shall copy the contents of a bson document into a new bson_t The resulting bson_t should be freed with bson_destroy(3)
bson_copy_to
The bson_copy_to(3) function shall initialize dst with a copy of the contents of src dst MUST be an uninitialized bson_t to avoid leaking memory.
bson_copy_to_excluding
The bson_copy_to_excluding(3) function shall copy all fields from src to dst except those speified by the variadic, NULL terminated list of keys starting from...
bson_count_keys
The bson_count_keys(3) function shall count the number of elements within bson
bson_creating
BSON documents are created using the bson_t structure. This structure encapsulates the necessary logic for encoding using the BSON Specification bson_t is a...
bson_decimal128_from_string
Parses the string containing ascii encoded decimal128 and initialize the bytes in decimal128
bson_decimal128_t
The bson_decimal128_t structure represents the IEEE‐754 Decimal128 data type.
bson_decimal128_to_string
Converts dec into a printable string.
bson_destroy
The bson_destroy(3) function shall free an allocated bson_t structure. This function should always be called when you are done with a bson_t unless otherwise...
bson_destroy_with_steal
The bson_destroy_with_steal(3) function shall destroy a bson_t structure but return the underlying buffer instead of freeing it. If steal is false, this is...
bson_endianness
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
bson_equal
The bson_equal(3) function shall return true if both documents are equal.
bson_errors
Many libbson functions report errors by returning NULL or ‐1 and filling out a bson_error_t structure with an error domain, error code, and message.
bson_error_t
The bson_error_t structure is used as an out‐parameter to pass error information to the caller. It should be stack‐allocated and does not requiring freeing. See...
bson_free
This function shall free the memory supplied by mem bson_free(3)
bson_get_data
The bson_get_data(3) function shall return the raw buffer of a bson document. This can be used in conjunction with the len property of a bson_t if you want to...
bson_get_major_version
Get the first number in libbson's MAJOR.MINOR.MICRO release version.
bson_get_micro_version
Get the third number in libbson's MAJOR.MINOR.MICRO release version.
bson_get_minor_version
Get the middle number in libbson's MAJOR.MINOR.MICRO release version.
bson_get_monotonic_time
The clock abstraction in Libbson provides a cross‐platform way to handle timeouts within the BSON library. It abstracts the differences in implementations of...
bson_get_version
A string representation of Libbson's version, formatted something like "1.2.3" or "1.2.3‐dev".
bson_has_field
Checks to see if key contains an element named key
bson_index
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
bson_init
The bson_init(3) function shall initialize a bson_t that is placed on the stack. This is equivalent to initializing a bson_t to BSON_INITIALIZER
bson_init_from_json
The bson_init_from_json(3) function will initialize a new bson_t by parsing the JSON found in data data or an error will be set and false returned. data should...
bson_init_static
The bson_init_static(3) function shall shall initialize a read‐only bson_t on the stack using the data provided. No copies of the data will be made and...
bson_installing
Libbson is continuously tested on GNU/Linux, Windows 7, Mac OS X 10.10, and Solaris 11 (Intel and Sparc), with GCC, Clang, and Visual Studio 2010, 2013, and...
bson_iter_array
The bson_iter_array(3) function shall retrieve the raw buffer of a sub‐array from iter iter MUST be on an element that is of type BSON_TYPE_ARRAY. This can be...
bson_iter_as_bool
Fetches the current field as if it were a boolean.
bson_iter_as_int64
The bson_iter_as_int64(3) function shall return the contents of the current element as if it were a BSON_TYPE_INT64 element.
bson_iter_binary
This function shall return the binary data of a BSON_TYPE_BINARY element. It is a programming error to call this function on a field that is not of type...
bson_iter_bool
The bson_iter_bool(3) function shall return the boolean value of a BSON_TYPE_BOOL element. It is a programming error to call this function on an element other...
bson_iter_code
This function returns the contents of a BSON_TYPE_CODE field. The length of the string is stored in length if non‐NULL. It is invalid to call this function on a...
bson_iter_codewscope
The bson_iter_codewscope(3) function acts similar to bson_iter_code(3) except for BSON_TYPE_CODEWSCOPE elements. It also will provide a pointer to the buffer...
bson_iter_date_time
The bson_iter_date_time() function shall return the number of milliseconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element.
bson_iter_dbpointer
Fetches the contents of a BSON_TYPE_DBPOINTER element. NOTE
bson_iter_decimal128
Fetches the value from a BSON_TYPE_DECIMAL128 field. You should verify that this is a BSON_TYPE_DECIMAL128 field before calling this function.
bson_iter_document
The bson_iter_document(3) function shall retrieve the raw buffer of a sub‐document from iter iter MUST be on an element that is of type BSON_TYPE_DOCUMENT. This...
bson_iter_double
Fetches the contents of a BSON_TYPE_DOUBLE field.
bson_iter_dup_utf8
This function is similar to bson_iter_utf8(3) except that it calls bson_strndup(3) on the result.
bson_iter_find
The bson_iter_find(3) function shall advance iter to the element named key or exhaust all elements of iter iter is exhausted, false is returned and iter should...
bson_iter_find_case
Advances iter until it is observing an element matching the name of key or exhausting all elements. key is not case‐sensitive. The keys will be case‐folded to...
bson_iter_find_descendant
The bson_iter_find_descendant(3) function shall follow standard MongoDB dot notation to recurse into subdocuments. descendant will be initialized and advanced...
bson_iter_init
The bson_iter_init(3) function shall initialize iter to iterate upon the BSON document bson iter is placed before the first element. Callers must call...
bson_iter_init_find
This function is identical to (bson_iter_init(3) && bson_iter_find(3))
bson_iter_init_find_case
This function is identical to bson_iter_init(3) && bson_iter_find_case(3)
bson_iter_int32
Fetches the value from a BSON_TYPE_INT32 element. You should verify that the field is a BSON_TYPE_INT32 field before calling this function.
bson_iter_int64
Fetches the value from a BSON_TYPE_INT64 field. You should verify that this is a BSON_TYPE_INT64 field before calling this function.
bson_iter_key
Fetches the key for the current element observed by iter
bson_iter_next
Advances iter to the next element in the document.
bson_iter_oid
Fetches the bson_oid_t for a BSON_TYPE_OID element. You should verify it is an element of type BSON_TYPE_OID before calling this function.
bson_iter_overwrite_bool
The bson_iter_overwrite_bool(3) function shall overwrite the contents of a BSON_TYPE_BOOL element in place. This may only be done when the underlying bson...
bson_iter_overwrite_decimal128
The bson_iter_overwrite_decimal128(3) function shall overwrite the contents of a BSON_TYPE_DECIMAL128 element in place. This may only be done when the...
bson_iter_overwrite_double
The bson_iter_overwrite_double(3) function shall overwrite the contents of a BSON_TYPE_DOUBLE element in place. This may only be done when the underlying bson...
bson_iter_overwrite_int32
The bson_iter_overwrite_int32(3) function shall overwrite the contents of a BSON_TYPE_INT32 element in place. This may only be done when the underlying bson...
bson_iter_overwrite_int64
The bson_iter_overwrite_int64(3) function shall overwrite the contents of a BSON_TYPE_INT64 element in place. This may only be done when the underlying bson...
bson_iter_recurse
The bson_iter_recurse(3) function shall initialize child using the embedded document or array currently observed by iter If there was a failure to initialize...
bson_iter_regex
The bson_iter_regex(3) function shall retrieve the contents of a BSON_TYPE_REGEX element currently observed by iter It is invalid to call this function when not...
bson_iter_symbol
The symbol element type is DEPRECATED in the bson specification at http://bsonspec.org. The bson_iter_symbol(3) function shall return the contents of a...
bson_iter_t
bson_iter_t is a structure used to iterate through the elements of a bson_t The bson_t MUST be valid for the lifetime of the iter and it is an error to modify...
bson_iter_timestamp
The BSON_TYPE_TIMESTAMP type is not a date/time and is typically used for intra‐server communication. You probably want bson_iter_date_time(3) The...
bson_iter_time_t
The bson_iter_time_t(3) function shall return the number of seconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element.
bson_iter_timeval
The bson_iter_timeval(3) function shall return the number of seconds and microseconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element into...
bson_iter_type
The bson_iter_type(3) function shall return the type of the observed element in a bson document.
bson_iter_utf8
The bson_iter_utf8(3) function shall retrieve the contents of a BSON_TYPE_UTF8 element currently observed by iter It is invalid to call this function while...
bson_iter_value
Fetches the value for the currently observed type as a boxed type. This allows passing around the value without knowing the type at runtime.
bson_iter_visit_all
A convenience function to iterate all remaining fields of iter using the callback vtable provided by visitor
bson_json
There are often times where you might want to convert a BSON document to JSON. It is convenient for debugging as well as an interchange format. To help with...
bson_json_data_reader_ingest
Feed data to a memory based json reader.
bson_json_data_reader_new
Creates a new streaming JSON reader that will convert JSON documents to BSON. The allow_multiple parameter is unused.
bson_json_reader_destroy
Frees a bson_json_reader_t.
bson_json_reader_new
Creates a new bson_json_reader_t that can read from an arbitrary data source in a streaming fashion. The allow_multiple parameter is unused.
bson_json_reader_new_from_fd
Creates a new JSON to BSON converter that will be reading from the file‐descriptor fd
bson_json_reader_new_from_file
Creates a new bson_json_reader_t using the underlying file found at filename
bson_json_reader_read
Reads the next BSON document from the underlying JSON source.
bson_json_reader_t
The bson_json_reader_t structure is used for reading a sequence of JSON documents and transforming them to bson_t documents. This can often be useful if you...
bson_malloc
This is a portable malloc(3) wrapper. In general, this function will return an allocation at least sizeof(void*) bytes or bigger. If there was a failure to...
bson_malloc0
This is a portable malloc(3) wrapper that also sets the memory to zero. Similar to calloc(3) In general, this function will return an allocation at least...
bson_md5_append
Feeds more data into the MD5 algorithm.
bson_md5_finish
Completes the MD5 algorithm and stores the digest in digest
bson_md5_init
Initialize a new instance of the MD5 algorithm.
bson_md5_t
bson_md5_t encapsulates an implementation of the MD5 algorithm. This is used in OID generation for the MD5(hostname) bytes. It is also used by some libraries...
bson_memory
Libbson contains a lightweight memory abstraction to make portability to new platforms easier. Additionally, it helps us integrate with interesting higher‐level...
bson_mem_restore_vtable
This function shall restore the default memory allocator to be used by Libbson. NOTE
bson_mem_set_vtable
This function shall install a new memory allocator to be used by Libbson. NOTE
bson_new
The bson_new(3) function shall create a new bson_t structure on the heap. It should be freed with bson_destroy(3) when it is no longer in use.
bson_new_from_buffer
Creates a new bson_t using the data provided. The realloc_func , if provided, is called to resize buf if the document is later expanded, for example by a call...
bson_new_from_data
The bson_new_from_data(3) function shall create a new bson_t on the heap and copy the contents of data
bson_new_from_json
The bson_new_from_json(3) function allocates and initialize a new bson_t by parsing the JSON found in data data or an error will be set and NULL returned.
bson_oid
None
bson_oid_compare
The bson_oid_compare(3) function shall return a qsort() style value of a lexicographical sort of _oid1_ and _oid2_.
bson_oid_copy
Copies the contents of src into dst.
bson_oid_equal
Checks if two bson_oid_t contain the same bytes.
bson_oid_get_time_t
Fetches the generation time in seconds since the UNIX Epoch of oid
bson_oid_hash
Generates a hash code for oid suitable for a hashtable.
bson_oid_init
Generates a new bson_oid_t using either context or the default bson_context_t
bson_oid_init_from_data
Initializes a bson_oid_t using the raw buffer provided.
bson_oid_init_from_string
Parses the string containing hex encoded oid and initialize the bytes in oid
bson_oid_init_sequence
Generates a new ObjectID using the 64‐bit sequence. NOTE
bson_oid_is_valid
Checks if a string containing a hex encoded string is a valid BSON ObjectID.
bson_oid_t
BSON ObjectID Abstraction
bson_oid_to_string
Converts oid into a hex encoded string.
bson_parsing
BSON documents are lazily parsed as necessary. To begin parsing a BSON document, use one of the provided Libbson functions to create a new bson_t from existing...
bson_performance
When writing marshaling layers between higher level languages and Libbson, you will eventually need to build keys for array elements. Each element in a BSON...
bson_reader_destroy
Destroys and releases all resources associated with reader
bson_reader_destroy_func_t
An optional callback function that will be called when a bson_reader_t created with bson_reader_new_from_handle is destroyed with bson_reader_destroy(3) The...
bson_reader_new_from_data
The bson_reader_new_from_data(3) function shall create a new bson_reader_t using the buffer supplied. data is not copied and MUST be valid for the lifetime of...
bson_reader_new_from_fd
The bson_reader_new_from_fd(3) function shall create a new bson_reader_t that will read from the provided file‐descriptor. fd MUST be in blocking mode. If...
bson_reader_new_from_file
Creates a new bson_reader_t using the file denoted by filename
bson_reader_new_from_handle
This function allows for a pluggable data stream for the reader. This can be used to read from sockets, files, memory, or other arbitrary sources.
bson_reader_read
The bson_reader_read(3) function shall read the next document from the underlying file‐descriptor or buffer. If there are no further documents or a failure was...
bson_reader_read_func_t
A callback function that will be called by bson_reader_t to read the next chunk of data from the underlying opaque file descriptor. This function is meant to...
bson_reader_reset
Seeks to the beginning of the underlying buffer. Valid only for a reader created from a buffer with bson_reader_new_from_data , not one created from a file...
bson_reader_set_destroy_func
Allows for setting a callback to be executed when a reader is destroyed. This should only be used by implementations implementing their own read callbacks.
bson_reader_set_read_func
Sets the function to read more data from the underlying stream in a custom bson_reader_t.
bson_reader_t
bson_reader_t is a structure used for reading a sequence of BSON documents. The sequence can come from a file‐descriptor, memory region, or custom callbacks.
bson_reader_tell
Tells the current position within the underlying stream.
bson_realloc
This is a portable realloc(3) wrapper. In general, this function will return an allocation at least sizeof(void*) bytes or bigger. If num_bytes is 0, then the...
bson_realloc_ctx
This function is identical to bson_realloc(3) except it takes a context parameter. This is useful when working with pooled or specific memory allocators.
bson_realloc_func
This is a prototype for pluggable realloc functions used through the Libbson library. If you wish to use a custom allocator this is one way to do it...
bson_reinit
The bson_reinit(3) function shall be equivalent to calling bson_destroy(3) and bson_init(3) However, if the bson_t structure contains a malloc()'d buffer, it...
bson_reserve_buffer
Grow the internal buffer of bson to size and set the document length to size First, initialize bson with bson_init or bson_new , then call this function. After...
bson_set_error
This is a helper function to set the parameters of a bson_error_t error is NULL by doing nothing.
bson_sized_new
The bson_sized_new(3) function shall create a new bson_t on the heap with a preallocated buffer. This is useful if you have a good idea of the size of the...
bson_snprintf
This is a portable wrapper around snprintf(3) in the resulting string.
bson_steal
Efficiently transfer the contents of src to dst and destroy src Before calling this function, src must be initialized and dst must be uninitialized.
bson_strdup
Copies str into a new string. If str is NULL, then NULL is returned.
bson_strdup_printf
This function performs a printf style format but into a newly allocated string.
bson_strdupv_printf
This function is like bson_strdup_printf(3) except takes a va_list of parameters.
bson_streaming_bson
bson_reader_t provides a convenient API to read sequential BSON documents from a file‐descriptor or memory buffer. The bson_reader_read(3) function will read...
bson_strerror_r
This is a portability wrapper around strerror(3)
bson_strfreev
This will free each string in a NULL‐terminated array of strings and then the array itself.
bson_string_append
Appends the ASCII or UTF‐8 encoded string str to string
bson_string_append_c
Appends c to the string builder string
bson_string_append_printf
Like bson_string_append() but formats a printf style string and then appends that to string
bson_string_append_unichar
Appends a unicode character to string. The character will be encoded into its multi‐byte UTF‐8 representation.
bson_string_free
Frees the bson_string_t structure and optionally the string itself.
bson_string_new
Creates a new string builder, which uses power‐of‐two growth of buffers. Use the various bson_string_append*() functions to append to the string.
bson_string_t
bson_string_t is an abstraction for building strings. As chunks are added to the string, allocations are performed in powers of two. This API is useful if you...
bson_string_truncate
Truncates the string so that it is len bytes in length. This must be smaller or equal to the current length of the string. A byte will be placed where the end...
bson_strncpy
Copies up to size bytes from src into dst dst must be at least size bytes in size. A trailing will be set.
bson_strndup
Allocates a new string and copies up to n_bytes from str into it. A trailing is always set.
bson_strnlen
A portable version of strnlen(3)
bson_subtype_t
This enumeration contains the various subtypes that may be used in a binary field. See http://bsonspec.org for more information.
bson_t
The bson_t structure represents a BSON document. This structure manages the underlying BSON encoded buffer. For mutable documents, it can append new data to the...
bson_threading
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
bson_type_t
The bson_type_t enumeration contains all of the types from the BSON Specification
bson_uint32_to_string
Converts value to a string. If value is from 0 to 999, it will use a constant string in the data section of the library. If not, a string will be formatted...
bson_unichar_t
bson_unichar_t provides an abstraction on a single unicode character. It is the 32‐bit representation of a character. As UTF‐8 can contain multi‐byte...
bson_utf8
Libbson expects that you are always working with UTF‐8 encoded text. Anything else is INVALID API USE. If you should need to walk through UTF‐8 sequences, you...
bson_utf8_escape_for_json
Escapes the string utf8 to be placed inside of a JSON string.
bson_utf8_from_unichar
Converts a single unicode character to a multi‐byte UTF‐8 sequence. The result is stored in utf8 and the number of bytes used in len
bson_utf8_get_char
Converts the current character in a UTF‐8 sequence to a bson_unichar_t, the 32‐bit representation of the multi‐byte character.
bson_utf8_next_char
Advances within utf8 to the next UTF‐8 character, which may be multiple bytes offset from utf8 It is invalid to call this function on a string whose current...
bson_utf8_validate
Validates that the content within utf8 is valid UTF‐8. If allow_null is true , then embedded NULL bytes are allowed ( ).
bson_validate
Validates a BSON document by walking through the document and inspecting the fields for valid content. You can modify how the validation occurs through the use...
bson_value_copy
This function will copy the boxed content in src into dst dst must be freed with bson_value_destroy(3) when no longer in use.
bson_value_destroy
Releases any resources associated with value
bson_value_t
The bson_value_t structure is a boxed type for encapsulating a runtime determined type.
bson_version
The following preprocessor macros can be used to perform various checks based on the version of the library you are compiling against. This may be useful if you...
bson_visitor_t
The bson_visitor_t structure provides a series of callbacks that can be called while iterating a BSON document. This may simplify the conversion of a bson_t to...
bson_vsnprintf
Like bson_snprintf() but allows for variadic parameters.
bson_writer_begin
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_destroy
Cleanup after writer and release any allocated memory. Note that the buffer supplied to bson_writer_new(3) is NOT freed from this method. The caller is...
bson_writer_end
Complete writing of a bson_writer_t to the buffer supplied.
bson_writer_get_length
Fetches the current length of the content written by the buffer (including the initial offset). This includes a partly written document currently being written...
bson_writer_new
Creates a new instance of bson_writer_t using the buffer , length , offset , and _realloc()_ function supplied. The caller is expected to clean up the structure...
bson_writer_rollback
Abort the appending of the current bson_t to the memory region managed by writer
bson_writer_t
The bson_writer_t API provides an abstraction for serializing many BSON documents to a single memory region. The memory region may be dynamically allocated and...
bson_zero_free
This function behaves like bson_free(3) except that it zeroes the memory first. This can be useful if you are storing passwords or other similarly important...