Skip to content
Back to top

# bson_append_array_begin()

Warning

Deprecated since version 2.3.0: Use bson_append_array_builder_begin to safely generate array keys (“0”, “1”, “2”, …) or bson_append_array_unsafe_begin() to manually provide keys.

## Synopsis

    #define BSON_APPEND_ARRAY_BEGIN(b, key, child) \
       bson_append_array_begin (b, key, (int) strlen (key), child)

    bool
    bson_append_array_begin (bson_t *bson,
                             const char *key,
                             int key_length,
                             bson_t *child);

## Description

This function is a deprecated alias of bson_append_array_unsafe_begin().

Consider using bson_array_builder_t to append an array without needing to generate array element keys.

See also

bson_array_builder_t
bson_append_array_unsafe_begin()