MCPcopy Create free account
hub / github.com/armink/struct2json / cJSON_CreateNull

Function cJSON_CreateNull

struct2json/src/cJSON.c:704–704  ·  view source on GitHub ↗

Create basic types: */

Source from the content-addressed store, hash-verified

702
703/* Create basic types: */
704cJSON *cJSON_CreateNull(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;}
705cJSON *cJSON_CreateTrue(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;}
706cJSON *cJSON_CreateFalse(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;}
707cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;}

Callers

nothing calls this directly

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected