Skip to content
Snippets Groups Projects
Verified Commit e689032c authored by Houtan Bastani's avatar Houtan Bastani
Browse files

fix bug in 3947903f

parent 7392cd3a
No related branches found
No related tags found
No related merge requests found
...@@ -639,7 +639,7 @@ ShockGroupsStatement::writeOutput(ostream &output, const string &basename, bool ...@@ -639,7 +639,7 @@ ShockGroupsStatement::writeOutput(ostream &output, const string &basename, bool
void void
ShockGroupsStatement::writeJsonOutput(ostream &output) const ShockGroupsStatement::writeJsonOutput(ostream &output) const
{ {
output << R"({"statementName": "shock_groups", "name": ")" << name << R"(", "groups": {)"; output << R"({"statementName": "shock_groups", "name": ")" << name << R"(", "groups": [)";
bool unique_label = true; bool unique_label = true;
bool printed_group = false; bool printed_group = false;
for (auto it = shock_groups.begin(); it != shock_groups.end(); it++, unique_label = true) for (auto it = shock_groups.begin(); it != shock_groups.end(); it++, unique_label = true)
...@@ -657,7 +657,7 @@ ShockGroupsStatement::writeJsonOutput(ostream &output) const ...@@ -657,7 +657,7 @@ ShockGroupsStatement::writeJsonOutput(ostream &output) const
output << ", "; output << ", ";
else else
printed_group = true; printed_group = true;
output << R"("group_name": ")" << it->name << R"(",)" output << R"({"group_name": ")" << it->name << R"(",)"
<< R"("shocks": [)"; << R"("shocks": [)";
for (auto it1 = it->list.begin(); it1 != it->list.end(); it1++) for (auto it1 = it->list.begin(); it1 != it->list.end(); it1++)
{ {
...@@ -665,8 +665,8 @@ ShockGroupsStatement::writeJsonOutput(ostream &output) const ...@@ -665,8 +665,8 @@ ShockGroupsStatement::writeJsonOutput(ostream &output) const
output << ", "; output << ", ";
output << R"(")" << *it1 << R"(")"; output << R"(")" << *it1 << R"(")";
} }
output << "]"; output << "]}";
} }
} }
output << "}}"; output << "]}";
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment