MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / cson_object_get

Function cson_object_get

cson/cson.c:470–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 return cson_object_set(obj, key, NULL);
469}
470cson_value *cson_object_get(cson_object *obj, char const *key)
471{
472 cson__render(obj->value);
473 char path[strlen(key) + 3];
474 sprintf(path, "$.%s", key);
475 cson_get *get = cson__get(obj->value, path);
476 if (!get) {
477 return NULL;
478 }
479 LIST_INSERT_HEAD(&obj->get_list, get, entry);
480 return get->value;
481}
482cson_value *cson_value_new_array(void)
483{
484 cson_value *val = calloc(1, sizeof(cson_value));

Callers 15

get_ispropnullFunction · 0.85
get_strpropFunction · 0.85
get_arrpropFunction · 0.85
get_intpropFunction · 0.85
get_doublepropFunction · 0.85
have_json_keyFunction · 0.85
dump_paramFunction · 0.85
dump_sql_eventFunction · 0.85
replayFunction · 0.85
bdb_set_table_parameterFunction · 0.85
test_h_arrFunction · 0.85

Calls 2

cson__renderFunction · 0.85
cson__getFunction · 0.85

Tested by 3

test_h_arrFunction · 0.68
test_iFunction · 0.68
test_jFunction · 0.68