MCPcopy Index your code
hub / github.com/binbyu/Reader / cJSON_AddStringToObject

Function cJSON_AddStringToObject

opensrc/cjson/cJSON.c:2025–2035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2023}
2024
2025CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2026{
2027 cJSON *string_item = cJSON_CreateString(string);
2028 if (add_item_to_object(object, name, string_item, &global_hooks, false))
2029 {
2030 return string_item;
2031 }
2032
2033 cJSON_Delete(string_item);
2034 return NULL;
2035}
2036
2037CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
2038{

Callers 8

json_font_tMethod · 0.85
json_bg_image_tMethod · 0.85
json_proxy_tMethod · 0.85
json_chapter_rule_tMethod · 0.85
json_tagitem_tMethod · 0.85
json_book_source_tMethod · 0.85
json_header_tMethod · 0.85
json_item_tMethod · 0.85

Calls 3

cJSON_CreateStringFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected