| 111 | } |
| 112 | |
| 113 | struct json_out *json_out_obj(const tal_t *ctx, |
| 114 | const char *fieldname, |
| 115 | const char *str) |
| 116 | { |
| 117 | struct json_out *jout = json_out_new(ctx); |
| 118 | json_out_start(jout, NULL, '{'); |
| 119 | if (str) |
| 120 | json_out_addstr(jout, fieldname, str); |
| 121 | tal_free_if_taken(str); |
| 122 | json_out_end(jout, '}'); |
| 123 | json_out_finished(jout); |
| 124 | |
| 125 | return jout; |
| 126 | } |
| 127 | |
| 128 | #if HAVE_SQLITE3 |
| 129 | #include <sqlite3.h> |
no test coverage detected