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

Function parse_arr

common/json_parse.c:442–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442static const char *parse_arr(const char *buffer,
443 const jsmntok_t *tok,
444 const char **guide,
445 va_list *ap)
446{
447 const char *errmsg;
448
449 guide_must_be(guide, '[');
450
451 if (tok->type != JSMN_ARRAY) {
452 return tal_fmt(tmpctx, "token is not an array: %.*s",
453 json_tok_full_len(tok),
454 json_tok_full(buffer, tok));
455 }
456
457 errmsg = parse_arrlist(buffer, tok, guide, ap);
458 if (errmsg)
459 return errmsg;
460
461 guide_must_be(guide, ']');
462 return NULL;
463}
464
465const char *json_scanv(const tal_t *ctx,
466 const char *buffer,

Callers 2

parse_guideFunction · 0.85
parse_fieldvalFunction · 0.85

Calls 4

guide_must_beFunction · 0.85
parse_arrlistFunction · 0.85
json_tok_full_lenFunction · 0.70
json_tok_fullFunction · 0.70

Tested by

no test coverage detected