Skip to content
Snippets Groups Projects
Verified Commit c03f4a55 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix JSON output when there are multiple “var_expectation_model” statements

Ref. Madysson/estimation-codes#19
parent 7df67819
Branches
No related tags found
No related merge requests found
...@@ -943,6 +943,8 @@ VarExpectationModelTable::writeJsonOutput(ostream &output) const ...@@ -943,6 +943,8 @@ VarExpectationModelTable::writeJsonOutput(ostream &output) const
{ {
for (const auto &name : names) for (const auto &name : names)
{ {
if (name != *names.begin())
output << ", ";
output << R"({"statementName": "var_expectation_model",)" output << R"({"statementName": "var_expectation_model",)"
<< R"("model_name": ")" << name << R"(", )" << R"("model_name": ")" << name << R"(", )"
<< R"("expression": ")"; << R"("expression": ")";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment