| 2514 | } |
| 2515 | |
| 2516 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) |
| 2517 | { |
| 2518 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2519 | if(item) |
| 2520 | { |
| 2521 | item->type = cJSON_Raw; |
| 2522 | item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); |
| 2523 | if(!item->valuestring) |
| 2524 | { |
| 2525 | cJSON_Delete(item); |
| 2526 | return NULL; |
| 2527 | } |
| 2528 | } |
| 2529 | |
| 2530 | return item; |
| 2531 | } |
| 2532 | |
| 2533 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2534 | { |
no test coverage detected
searching dependent graphs…