MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / json_unique_member

Function json_unique_member

src/ui/http_server.c:2962–2976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2960/* ── Handle JSON-RPC request ──────────────────────────────────── */
2961
2962static yyjson_val *json_unique_member(yyjson_val *object, const char *name) {
2963 if (!yyjson_is_obj(object))
2964 return NULL;
2965 yyjson_val *found = NULL;
2966 size_t index, maximum;
2967 yyjson_val *key, *value;
2968 yyjson_obj_foreach(object, index, maximum, key, value) {
2969 if (strcmp(yyjson_get_str(key), name) == 0) {
2970 if (found)
2971 return NULL;
2972 found = value;
2973 }
2974 }
2975 return found;
2976}
2977
2978/* Tools the browser may call through /rpc: the read-only query surface and
2979 * nothing that mutates the index. Writes (index_repository, delete_project,

Callers 2

rpc_manage_adr_is_readFunction · 0.85
rpc_is_allowed_for_uiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected