MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / cJSON_AddStringToObject

Function cJSON_AddStringToObject

ThirdParty/cjson/cJSON.c:2037–2047  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2035}
2036
2037CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2038{
2039 cJSON *string_item = cJSON_CreateString(string);
2040 if (add_item_to_object(object, name, string_item, &global_hooks, false))
2041 {
2042 return string_item;
2043 }
2044
2045 cJSON_Delete(string_item);
2046 return NULL;
2047}
2048
2049CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
2050{

Callers

nothing calls this directly

Calls 3

cJSON_CreateStringFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected