Function cJSON_AddArrayToObject

Synopsis

#include <cJSON.h>

cJSON * cJSON_AddArrayToObject(cJSON *const object, const char *const name)

Description

No description yet.

Mentioned in

Source

Lines 2171-2181 in cJSON.c. Line 272 in cJSON.h.

CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
{
    cJSON *array = cJSON_CreateArray();
    if (add_item_to_object(object, name, array, &global_hooks, false))
    {
        return array;
    }

    cJSON_Delete(array);
    return NULL;
}





Add Discussion as Guest

Log in