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

Function json_get_bool

src/pipeline/pass_complexity.c:65–80  ·  view source on GitHub ↗

Parse a boolean "key":true/false from a flat JSON object. */

Source from the content-addressed store, hash-verified

63
64/* Parse a boolean "key":true/false from a flat JSON object. */
65static bool json_get_bool(const char *json, const char *key) {
66 if (!json) {
67 return false;
68 }
69 char pat[CBM_SZ_64];
70 snprintf(pat, sizeof(pat), "\"%s\":", key);
71 const char *p = strstr(json, pat);
72 if (!p) {
73 return false;
74 }
75 p += strlen(pat);
76 while (*p == ' ' || *p == '\t') {
77 p++;
78 }
79 return *p == 't';
80}
81
82/* Append transitive_loop_depth + recursive to a node's properties JSON object. */
83static void append_complexity_props(cbm_gbuf_node_t *node, int tld, bool recursive) {

Callers 1

tld_seedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected