From f37f272e4bc0fc0c41ed5486ba6e5718fd80084f Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 13 Jun 2021 05:09:39 +0000 Subject: [PATCH] Fix #567 (#569) --- c/output/lrec_writer_json.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/output/lrec_writer_json.c b/c/output/lrec_writer_json.c index 21822bfdd..ede717054 100644 --- a/c/output/lrec_writer_json.c +++ b/c/output/lrec_writer_json.c @@ -151,6 +151,9 @@ static void lrec_writer_json_process(void* pvstate, FILE* output_stream, lrec_t* lrec_free(prec); // end of baton-pass } else { // end of record stream + if (pstate->counter == 0) { + fputs(pstate->before_records_at_start_of_stream1, output_stream); + } fputs(pstate->after_records_at_end_of_stream1, output_stream); fputs(before_or_after_records, output_stream); }