MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSON_AddNumberToObject

Function cJSON_AddNumberToObject

cpworker/src/cJSON/cJSON.c:2145–2155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2143}
2144
2145CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2146{
2147 cJSON *number_item = cJSON_CreateNumber(number);
2148 if (add_item_to_object(object, name, number_item, &global_hooks, false))
2149 {
2150 return number_item;
2151 }
2152
2153 cJSON_Delete(number_item);
2154 return NULL;
2155}
2156
2157CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2158{

Callers 2

unix_rpc_ping_commandFunction · 0.85
unix_rpc_info_commandFunction · 0.85

Calls 3

cJSON_CreateNumberFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected