Skip to content

Commit

Permalink
fix the JSONFormatter flush & close_section:right now flush will not …
Browse files Browse the repository at this point in the history
…output n,and close_section will output n when m_stack has no entry.
  • Loading branch information
Aran85 committed Jul 30, 2015
1 parent b3243b6 commit 727a120
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/Formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void JSONFormatter::close_section()
}
m_ss << (entry.is_array ? ']' : '}');
m_stack.pop_back();
if (!m_stack.size())
if (m_pretty && (!m_stack.size()))
m_ss << "\n";
}

Expand Down

0 comments on commit 727a120

Please sign in to comment.