| 584 | } |
| 585 | |
| 586 | static struct json_stream *json_start(struct command *cmd) |
| 587 | { |
| 588 | struct json_stream *js = json_stream_raw_for_cmd(cmd); |
| 589 | |
| 590 | json_object_start(js, NULL); |
| 591 | json_add_string(js, "jsonrpc", "2.0"); |
| 592 | if (cmd->id_is_string) |
| 593 | json_add_string(js, "id", cmd->id); |
| 594 | else |
| 595 | json_add_jsonstr(js, "id", cmd->id, strlen(cmd->id)); |
| 596 | return js; |
| 597 | } |
| 598 | |
| 599 | struct json_stream *json_stream_success(struct command *cmd) |
| 600 | { |
no test coverage detected