fixed #31: only use spaces in pretty print
This commit is contained in:
parent
b30e9ee5f4
commit
7724d34741
4 changed files with 13 additions and 13 deletions
|
@ -530,7 +530,7 @@ std::string json::dump(const bool prettyPrint, const unsigned int indentStep,
|
|||
{
|
||||
if (i != value_.array->begin())
|
||||
{
|
||||
result += prettyPrint ? ",\n" : ", ";
|
||||
result += prettyPrint ? ",\n" : ",";
|
||||
}
|
||||
result += indent() + i->dump(prettyPrint, indentStep, currentIndent);
|
||||
}
|
||||
|
@ -565,10 +565,11 @@ std::string json::dump(const bool prettyPrint, const unsigned int indentStep,
|
|||
{
|
||||
if (i != value_.object->begin())
|
||||
{
|
||||
result += prettyPrint ? ",\n" : ", ";
|
||||
result += prettyPrint ? ",\n" : ",";
|
||||
}
|
||||
result += indent() + "\"" + i->first + "\": " + i->second.dump(prettyPrint, indentStep,
|
||||
currentIndent);
|
||||
result += indent() + "\"" + i->first + "\":" + (prettyPrint ? " " : "") + i->second.dump(
|
||||
prettyPrint, indentStep,
|
||||
currentIndent);
|
||||
}
|
||||
|
||||
// decrease indentation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue