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

Function json_get_arr

common/json_parse_simple.c:214–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214const jsmntok_t *json_get_arr(const jsmntok_t tok[], size_t index)
215{
216 const jsmntok_t *t;
217 size_t i;
218
219 if (tok->type != JSMN_ARRAY)
220 return NULL;
221
222 json_for_each_arr(i, t, tok) {
223 if (index == 0)
224 return t;
225 index--;
226 }
227
228 return NULL;
229}
230
231const char *json_get_id(const tal_t *ctx,
232 const char *buffer, const jsmntok_t *obj)

Callers 2

plugin_rpcmethods_addFunction · 0.85
parse_arrelemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected