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

Function json_get_arr

common/json_parse_simple.c:173–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173const jsmntok_t *json_get_arr(const jsmntok_t tok[], size_t index)
174{
175 const jsmntok_t *t;
176 size_t i;
177
178 if (tok->type != JSMN_ARRAY)
179 return NULL;
180
181 json_for_each_arr(i, t, tok) {
182 if (index == 0)
183 return t;
184 index--;
185 }
186
187 return NULL;
188}
189
190const char *json_get_id(const tal_t *ctx,
191 const char *buffer, const jsmntok_t *obj)

Callers 5

plugin_opts_addFunction · 0.85
plugin_rpcmethods_addFunction · 0.85
plugin_subscriptions_addFunction · 0.85
parse_arrelemFunction · 0.85
fundchannel_get_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected