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

Function string_array_jsonfmt

plugins/libplugin.c:1741–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739}
1740
1741bool string_array_jsonfmt(struct command *cmd, struct json_stream *js,
1742 const char *fieldname, const char ***arr)
1743{
1744 if (tal_count(*arr) == 0)
1745 return false;
1746 json_array_start(js, fieldname);
1747 for (size_t i = 0; i < tal_count(*arr); i++)
1748 json_add_string(js, NULL, (*arr)[i]);
1749 json_array_end(js);
1750 return true;
1751}
1752
1753bool flag_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, bool *i)
1754{

Callers

nothing calls this directly

Calls 3

json_array_startFunction · 0.85
json_array_endFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected