| 548 | cJSON *cJSON_CreateString(const char *string) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);}return item;} |
| 549 | cJSON *cJSON_CreateArray() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;} |
| 550 | cJSON *cJSON_CreateObject() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;} |
| 551 | |
| 552 | /* Create Arrays: */ |
| 553 | cJSON *cJSON_CreateIntArray(int *numbers,int count) {cJSON *p=nullptr,*a=cJSON_CreateArray();for(int i=0;a && i<count;i++){cJSON *n=cJSON_CreateNumber(numbers[i]);if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;} |
no test coverage detected