json output: print statements in original model output

parent abfe1a70
Pipeline #943 passed with stage
in 1 minute and 20 seconds
......@@ -1308,7 +1308,6 @@ ModFile::writeJsonOutputParsingCheck(const string &basename, JsonFileOutputType
output << ", ";
dynamic_model.writeJsonOutput(output);
if (!statements.empty()
|| !var_model_table.empty()
|| !trend_component_model_table.empty())
......@@ -1349,6 +1348,27 @@ ModFile::writeJsonOutputParsingCheck(const string &basename, JsonFileOutputType
{
original_model_output << "{";
original_model.writeJsonOriginalModelOutput(original_model_output);
if (!statements.empty() || !var_model_table.empty() || !trend_component_model_table.empty())
{
original_model_output << endl << ", \"statements\": [";
if (!var_model_table.empty())
{
var_model_table.writeJsonOutput(original_model_output);
original_model_output << ", ";
}
if (!trend_component_model_table.empty())
{
trend_component_model_table.writeJsonOutput(original_model_output);
original_model_output << ", ";
}
int i = 0;
for (const auto & it : statements)
{
original_model_output << (i++ > 0 ? "," : "") << endl;
it->writeJsonOutput(original_model_output);
}
original_model_output << "]" << endl;
}
original_model_output << "}" << endl;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment