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

Function parse_arr

common/json_parse.c:446–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446static const char *parse_arr(const char *buffer,
447 const jsmntok_t *tok,
448 const char **guide,
449 va_list *ap)
450{
451 const char *errmsg;
452
453 guide_must_be(guide, '[');
454
455 if (tok && tok->type != JSMN_ARRAY) {
456 return tal_fmt(tmpctx, "token is not an array: %.*s",
457 json_tok_full_len(tok),
458 json_tok_full(buffer, tok));
459 }
460
461 errmsg = parse_arrlist(buffer, tok, guide, ap);
462 if (errmsg)
463 return errmsg;
464
465 guide_must_be(guide, ']');
466 return NULL;
467}
468
469const char *json_scanv(const tal_t *ctx,
470 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.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected