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

Function parse_obj

common/json_parse.c:379–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379static const char *parse_obj(const char *buffer,
380 const jsmntok_t *tok,
381 const char **guide,
382 va_list *ap)
383{
384 const char *errmsg;
385
386 guide_must_be(guide, '{');
387
388 if (tok && tok->type != JSMN_OBJECT) {
389 return tal_fmt(tmpctx, "token is not an object: %.*s",
390 json_tok_full_len(tok),
391 json_tok_full(buffer, tok));
392 }
393
394 errmsg = parse_fieldlist(buffer, tok, guide, ap);
395 if (errmsg)
396 return errmsg;
397
398 guide_must_be(guide, '}');
399 return NULL;
400}
401
402static const char *parse_arrelem(const char *buffer,
403 const jsmntok_t *tok,

Callers 2

parse_guideFunction · 0.85
parse_fieldvalFunction · 0.85

Calls 4

guide_must_beFunction · 0.85
parse_fieldlistFunction · 0.85
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected