Function cJSON_CreateNull

Synopsis

#include <cJSON.h>

cJSON * cJSON_CreateNull(void)

Description

These calls create a cJSON item of the appropriate type.

Create basic types:

Mentioned in

Source

Lines 2376-2385 in cJSON.c. Line 195 in cJSON.h.

CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_NULL;
    }

    return item;
}





Add Discussion as Guest

Log in