cJSON获取bool值


if ( cJSON_IsTrue(cJSON_GetObjectItem(subitem, "isDayTime")) == 1) {
    /* do something if it's true */
 } else {
    /* do something if it's false */
 }