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

Function json_add_tok

common/json_stream.c:393–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391
392
393void json_add_tok(struct json_stream *result, const char *fieldname,
394 const jsmntok_t *tok, const char *buffer)
395{
396 char *space;
397 assert(tok->type != JSMN_UNDEFINED);
398
399 if (!json_filter_ok(result->filter, fieldname))
400 return;
401
402 space = json_member_direct(result, fieldname, json_tok_full_len(tok));
403 memcpy(space, json_tok_full(buffer, tok), json_tok_full_len(tok));
404}
405
406void json_add_jsonrpc_errcode(struct json_stream *result, const char *fieldname,
407 enum jsonrpc_errcode code)

Callers 15

plugin_notify_cbFunction · 0.85
testrpc_cbFunction · 0.85
json_checkthisFunction · 0.85
after_recover_rpcFunction · 0.85
try_commandFunction · 0.85
add_invoice_del_fieldsFunction · 0.85
add_sendpays_del_fieldsFunction · 0.85
add_forward_del_fieldsFunction · 0.85
json_fundchannelFunction · 0.85

Calls 4

json_member_directFunction · 0.85
json_filter_okFunction · 0.70
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by 2

testrpc_cbFunction · 0.68
json_checkthisFunction · 0.68