bson_new (3) - Linux Manuals
bson_new: The bson_new() function shall create a new bson_t structure on the heap. It should be freed with bson_destroy() when it is no longer in use.
Command to display bson_new
manual in Linux: $ man 3 bson_new
NAME
bson_new() - The bson_new() function shall create a new bson_t structure on the heap. It should be freed with bson_destroy() when it is no longer in use.
SYNOPSIS
bson_t *
bson_new (void);
DESCRIPTION
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.
RETURNS
A newly allocated
bson_t
that should be freed with
bson_destroy(3)
\&.
COLOPHON
This page is part of libbson.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to bson_new
- bson_new_from_buffer (3) - TODO:
- bson_new_from_data (3) - The bson_new_from_data() function shall create a new bson_t on the heap and copy the contents of data. This may be helpful when working with language bindings but is generally expected to be slower.
- bson_new_from_json (3) - The bson_new_from_json() function allocates and initialize a new bson_t by parsing the JSON found in data. Only a single JSON object may exist in data or an error will be set and NULL returned.
- bson_append_array (3) - The bson_append_array() 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 the caller to ensure that the keys of child are properly formatted with string keys such as "0", "1", "2" and so forth.
- bson_append_array_begin (3) - The bson_append_array_begin() function shall begin appending an array field to bson. This allows for incrementally building a sub-array. Doing so will generally yield better performance as you will serialize to a single buffer. When done building the sub-array, the caller MUST call bson_append_array_end().
- bson_append_array_end (3) - The bson_append_array_end() function shall complete the appending of an array field started with bson_append_array_begin(). child is invalid after calling this function.
- bson_append_binary (3) - The bson_append_binary() function shall append a new element to bson containing the binary data provided.
- bson_append_bool (3) - The bson_append_bool() function shall append a new element to bson containing the boolean provided.
- bson_append_code (3) - The bson_append_code() function shall append a new element to bson using the UTF-8 encoded javascript provided. javascript must be a NULL terminated C string.