| 2579 | } |
| 2580 | |
| 2581 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) |
| 2582 | { |
| 2583 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2584 | if(item) |
| 2585 | { |
| 2586 | item->type = cJSON_Raw; |
| 2587 | item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); |
| 2588 | if(!item->valuestring) |
| 2589 | { |
| 2590 | cJSON_Delete(item); |
| 2591 | return NULL; |
| 2592 | } |
| 2593 | } |
| 2594 | |
| 2595 | return item; |
| 2596 | } |
| 2597 | |
| 2598 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2599 | { |
no test coverage detected