diff options
Diffstat (limited to 'json-writer.c')
-rw-r--r-- | json-writer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/json-writer.c b/json-writer.c index aadb9dbddc..f1cfd8fa8c 100644 --- a/json-writer.c +++ b/json-writer.c @@ -3,10 +3,8 @@ void jw_init(struct json_writer *jw) { - strbuf_init(&jw->json, 0); - strbuf_init(&jw->open_stack, 0); - jw->need_comma = 0; - jw->pretty = 0; + struct json_writer blank = JSON_WRITER_INIT; + memcpy(jw, &blank, sizeof(*jw));; } void jw_release(struct json_writer *jw) |