| 2564 | } |
| 2565 | |
| 2566 | CJSON_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 | |
| 2583 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2584 | { |
searching dependent graphs…