From c03f4a559ae344bcb2233c85987a1f7544c493a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 15 Feb 2022 20:58:36 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20JSON=20output=20when=20there=20are=20mult?= =?UTF-8?q?iple=20=E2=80=9Cvar=5Fexpectation=5Fmodel=E2=80=9D=20statements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref. Madysson/estimation-codes#19 --- src/SubModel.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SubModel.cc b/src/SubModel.cc index b6b764a1..3b8233dd 100644 --- a/src/SubModel.cc +++ b/src/SubModel.cc @@ -943,6 +943,8 @@ VarExpectationModelTable::writeJsonOutput(ostream &output) const { for (const auto &name : names) { + if (name != *names.begin()) + output << ", "; output << R"({"statementName": "var_expectation_model",)" << R"("model_name": ")" << name << R"(", )" << R"("expression": ")"; -- GitLab