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

Function json_get_arr

common/json_parse_simple.c:261–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261const jsmntok_t *json_get_arr(const jsmntok_t tok[], size_t index)
262{
263 const jsmntok_t *t;
264 size_t i;
265
266 if (tok->type != JSMN_ARRAY)
267 return NULL;
268
269 json_for_each_arr(i, t, tok) {
270 if (index == 0)
271 return t;
272 index--;
273 }
274
275 return NULL;
276}
277
278const char *json_get_id(const tal_t *ctx,
279 const char *buffer, const jsmntok_t *obj)

Callers 4

plugin_rpcmethods_addFunction · 0.85
relists_runesFunction · 0.85
creates_new_runeFunction · 0.85
parse_arrelemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected