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

Function json_get_id

common/json_parse_simple.c:278–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278const char *json_get_id(const tal_t *ctx,
279 const char *buffer, const jsmntok_t *obj)
280{
281 const jsmntok_t *idtok = json_get_member(buffer, obj, "id");
282 if (!idtok)
283 return NULL;
284 return tal_strndup(ctx,
285 json_tok_full(buffer, idtok),
286 json_tok_full_len(idtok));
287}
288
289/*-----------------------------------------------------------------------------
290JSMN 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