Added function cJSON_CreateTrueFalseArray() to create array of true/false values
Brought to you by:
davegamble
I needed support for printing an array of true,false conditions. So here is what I came up with. Thanks for your effort!
/ cJSON.c /
cJSON cJSON_CreateTrueFalseArray(int true_false,int count) {int i;cJSON n=0,p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){if(true_false<span>[i] > 0){n=cJSON_CreateTrue();}else{n=cJSON_CreateFalse();}if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}</count;i++){if(true_false<span>
/ cJSON.h /
extern cJSON cJSON_CreateTrueFalseArray(int true_false,int count);
EDIT: sourceforge messed up the formatting
EDIT: sourceforge messed up the formatting