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

fix bug in writing of JSON output in options list

parent 7b6f23c5
Branches
No related tags found
No related merge requests found
/* /*
* Copyright (C) 2006-2018 Dynare Team * Copyright (C) 2006-2019 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -256,10 +256,11 @@ OptionsList::writeJsonOutput(ostream &output) const ...@@ -256,10 +256,11 @@ OptionsList::writeJsonOutput(ostream &output) const
} }
for (auto it = symbol_list_options.begin(); for (auto it = symbol_list_options.begin();
it != symbol_list_options.end(); it++) it != symbol_list_options.end();)
{ {
output << "\""<< it->first << "\":"; output << "\""<< it->first << "\": {";
it->second.writeJsonOutput(output); it->second.writeJsonOutput(output);
output << "}";
it++; it++;
if (it != symbol_list_options.end() if (it != symbol_list_options.end()
|| !vector_int_options.empty()) || !vector_int_options.empty())
...@@ -289,7 +290,6 @@ OptionsList::writeJsonOutput(ostream &output) const ...@@ -289,7 +290,6 @@ OptionsList::writeJsonOutput(ostream &output) const
output << ", "; output << ", ";
} }
for (auto it = vector_str_options.begin(); for (auto it = vector_str_options.begin();
it != vector_str_options.end();) it != vector_str_options.end();)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment