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

Function param_arr

common/json_param.c:279–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279static struct command_result *param_arr(struct command *cmd, const char *buffer,
280 const jsmntok_t tokens[],
281 struct param *params,
282 bool allow_extra)
283{
284 if (tokens->type == JSMN_ARRAY)
285 return parse_by_position(cmd, params, buffer, tokens, allow_extra);
286 else if (tokens->type == JSMN_OBJECT)
287 return parse_by_name(cmd, params, buffer, tokens, allow_extra);
288
289 return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
290 "Expected array or object for params");
291}
292
293const char *param_subcommand(struct command *cmd, const char *buffer,
294 const jsmntok_t tokens[],

Callers 3

param_subcommandFunction · 0.85
param_coreFunction · 0.85
five_hundred_paramsFunction · 0.85

Calls 3

parse_by_positionFunction · 0.85
parse_by_nameFunction · 0.85
command_failFunction · 0.50

Tested by 1

five_hundred_paramsFunction · 0.68