| 2526 | } |
| 2527 | |
| 2528 | CJSON_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 | |
| 2545 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2546 | { |
no test coverage detected