MCPcopy Create free account
hub / github.com/ElementsProject/lightning / remove_inside_obj

Function remove_inside_obj

common/test/run-json_remove.c:321–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321static void remove_inside_obj(void)
322{
323 jsmntok_t *tok;
324 struct json *j = json_parse(tmpctx,
325 "{'1':'one', '2':'two',"
326 "'3': { '3.1': 'a', '3.2':'b', '3.3':'c' }, "
327 "'4':'four'}");
328
329 tok = (jsmntok_t *)json_get_member(j->buffer, j->toks, "3");
330 json_tok_remove(&j->toks, tok, tok+1, 1);
331 test_toks(j, "1", "one", "2", "two", "3", "{", "3.2", "b", "3.3", "c",
332 "4", "four", NULL);
333}
334
335int main(int argc, char *argv[])
336{

Callers 1

mainFunction · 0.85

Calls 4

json_tok_removeFunction · 0.85
test_toksFunction · 0.85
json_parseFunction · 0.70
json_get_memberFunction · 0.70

Tested by

no test coverage detected