MCPcopy Create free account
hub / github.com/OpenIPC/firmware / cJSON_AddTrueToObject

Function cJSON_AddTrueToObject

general/package/xmdp/src/cjson/cJSON.c:2094–2104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2092}
2093
2094CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name)
2095{
2096 cJSON *true_item = cJSON_CreateTrue();
2097 if (add_item_to_object(object, name, true_item, &global_hooks, false))
2098 {
2099 return true_item;
2100 }
2101
2102 cJSON_Delete(true_item);
2103 return NULL;
2104}
2105
2106CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name)
2107{

Callers

nothing calls this directly

Calls 3

cJSON_CreateTrueFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected