bson_new_from_data man page

bson_new_from_data() — 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.

Synopsis

bson_t *
bson_new_from_data (const uint8_t *data,
                    size_t         length);

Parameters

data
A BSON encoded document buffer.
length
The length of data in bytes.

Description

The bson_new_from_data(3) function shall create a new bson_t on the heap and copy the contents of data

Returns

A newly allocated bson_t if successful, otherwise NULL.

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Referenced By

bson_parsing(3).

2016‐10‐28 libbson