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

Function json_get_id

common/json_parse_simple.c:231–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231const char *json_get_id(const tal_t *ctx,
232 const char *buffer, const jsmntok_t *obj)
233{
234 const jsmntok_t *idtok = json_get_member(buffer, obj, "id");
235 if (!idtok)
236 return NULL;
237 return tal_strndup(ctx,
238 json_tok_full(buffer, idtok),
239 json_tok_full_len(idtok));
240}
241
242/*-----------------------------------------------------------------------------
243JSMN Result Validation Starts

Callers 1

ld_command_handleFunction · 0.85

Calls 3

json_get_memberFunction · 0.85
json_tok_fullFunction · 0.70
json_tok_full_lenFunction · 0.70

Tested by

no test coverage detected