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

Function parse_arrelem

common/json_parse.c:402–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402static const char *parse_arrelem(const char *buffer,
403 const jsmntok_t *tok,
404 const char **guide,
405 va_list *ap)
406{
407 const jsmntok_t *member;
408 u32 idx;
409
410 parse_number(guide, &idx);
411 guide_must_be(guide, ':');
412
413 member = json_get_arr(tok, idx);
414 if (!member) {
415 return tal_fmt(tmpctx, "token has no index %u: %.*s",
416 idx,
417 json_tok_full_len(tok),
418 json_tok_full(buffer, tok));
419 }
420
421 return parse_fieldval(buffer, member, guide, ap);
422}
423
424static const char *parse_arrlist(const char *buffer,
425 const jsmntok_t *tok,

Callers 1

parse_arrlistFunction · 0.85

Calls 6

parse_numberFunction · 0.85
guide_must_beFunction · 0.85
json_get_arrFunction · 0.85
parse_fieldvalFunction · 0.85
json_tok_full_lenFunction · 0.70
json_tok_fullFunction · 0.70

Tested by

no test coverage detected