MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSON_CreateRaw

Function cJSON_CreateRaw

cpworker/src/cJSON/cJSON.c:2528–2543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2526}
2527
2528CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2529{
2530 cJSON *item = cJSON_New_Item(&global_hooks);
2531 if(item)
2532 {
2533 item->type = cJSON_Raw;
2534 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2535 if(!item->valuestring)
2536 {
2537 cJSON_Delete(item);
2538 return NULL;
2539 }
2540 }
2541
2542 return item;
2543}
2544
2545CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2546{

Callers 1

cJSON_AddRawToObjectFunction · 0.85

Calls 3

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected