MCPcopy Create free account
hub / github.com/DaveGamble/cJSON / cJSON_CreateRaw

Function cJSON_CreateRaw

cJSON.c:2566–2581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2564}
2565
2566CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2567{
2568 cJSON *item = cJSON_New_Item(&global_hooks);
2569 if(item)
2570 {
2571 item->type = cJSON_Raw;
2572 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2573 if(!item->valuestring)
2574 {
2575 cJSON_Delete(item);
2576 return NULL;
2577 }
2578 }
2579
2580 return item;
2581}
2582
2583CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2584{

Calls 3

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85
cJSON_DeleteFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…