MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / cJSON_AddBoolToObject

Function cJSON_AddBoolToObject

framework/utils/cJSON.c:1999–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1997}
1998
1999CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
2000{
2001cJSON *bool_item = cJSON_CreateBool(boolean);
2002if (add_item_to_object(object, name, bool_item, &global_hooks, false))
2003{
2004return bool_item;
2005}
2006
2007cJSON_Delete(bool_item);
2008return NULL;
2009}
2010
2011CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2012{

Callers 1

addValueMethod · 0.85

Calls 3

cJSON_CreateBoolFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected