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

Function json_out_obj

plugins/libplugin.c:538–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538struct json_out *json_out_obj(const tal_t *ctx,
539 const char *fieldname,
540 const char *str)
541{
542 struct json_out *jout = json_out_new(ctx);
543 json_out_start(jout, NULL, '{');
544 if (str)
545 json_out_addstr(jout, fieldname, str);
546 tal_free_if_taken(str);
547 json_out_end(jout, '}');
548 json_out_finished(jout);
549
550 return jout;
551}
552
553/* This closes a JSON response and writes it out. */
554static void finish_and_send_json(int fd, struct json_out *jout)

Callers 15

initFunction · 0.70
initFunction · 0.70
initFunction · 0.70
initFunction · 0.70
command_check_doneFunction · 0.70
handle_initFunction · 0.70
initFunction · 0.70
initFunction · 0.70
initFunction · 0.70
initFunction · 0.70
initFunction · 0.70

Calls 6

json_out_newFunction · 0.85
json_out_startFunction · 0.85
json_out_addstrFunction · 0.85
tal_free_if_takenFunction · 0.85
json_out_endFunction · 0.85
json_out_finishedFunction · 0.85

Tested by 3

get_ds_doneFunction · 0.40
json_helloworldFunction · 0.40
spam_doneFunction · 0.40