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

Function cJSON_AddStringToObject

cpworker/src/cJSON/cJSON.c:2157–2167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2155}
2156
2157CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2158{
2159 cJSON *string_item = cJSON_CreateString(string);
2160 if (add_item_to_object(object, name, string_item, &global_hooks, false))
2161 {
2162 return string_item;
2163 }
2164
2165 cJSON_Delete(string_item);
2166 return NULL;
2167}
2168
2169CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
2170{

Callers 1

unix_rpc_info_commandFunction · 0.85

Calls 3

cJSON_CreateStringFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected