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

Function cJSON_AddBoolToObject

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

Source from the content-addressed store, hash-verified

2116}
2117
2118CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
2119{
2120 cJSON *bool_item = cJSON_CreateBool(boolean);
2121 if (add_item_to_object(object, name, bool_item, &global_hooks, false))
2122 {
2123 return bool_item;
2124 }
2125
2126 cJSON_Delete(bool_item);
2127 return NULL;
2128}
2129
2130CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2131{

Callers

nothing calls this directly

Calls 3

cJSON_CreateBoolFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected