| 221 | } |
| 222 | |
| 223 | void json_add_jsonstr(struct json_stream *js, |
| 224 | const char *fieldname, |
| 225 | const char *jsonstr, |
| 226 | size_t jsonstrlen) |
| 227 | { |
| 228 | char *p; |
| 229 | |
| 230 | /* NOTE: Filtering doesn't really work here! */ |
| 231 | if (!json_filter_ok(js->filter, fieldname)) |
| 232 | return; |
| 233 | |
| 234 | p = json_member_direct(js, fieldname, jsonstrlen); |
| 235 | memcpy(p, jsonstr, jsonstrlen); |
| 236 | } |
| 237 | |
| 238 | /* This is where we read the json_stream and write it to conn */ |
| 239 | static struct io_plan *json_stream_output_write(struct io_conn *conn, |
no test coverage detected