JSON made serialization more compact and undid last commit
This commit is contained in:
@ -480,18 +480,16 @@ namespace Tesses::Framework::Serialization::Json
|
||||
bool first=true;
|
||||
for(auto item : dict)
|
||||
{
|
||||
|
||||
if(!first) {
|
||||
str.push_back(',');
|
||||
}
|
||||
if(indent) {
|
||||
if(first) str.push_back(',');
|
||||
str.append("\n");
|
||||
str.append(tab(Encode(item.first,true) + ": " + Encode(item.second,true)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!first) {
|
||||
str.append(", ");
|
||||
}
|
||||
str.append(Encode(item.first,false)+": "+Encode(item.second,false));
|
||||
str.append(Encode(item.first,false)+":"+Encode(item.second,false));
|
||||
}
|
||||
first=false;
|
||||
}
|
||||
@ -506,18 +504,16 @@ namespace Tesses::Framework::Serialization::Json
|
||||
for(auto item : ls)
|
||||
{
|
||||
|
||||
if(!first) {
|
||||
str.push_back(',');
|
||||
}
|
||||
if(indent) {
|
||||
|
||||
if(!first) {
|
||||
str.push_back(',');
|
||||
}
|
||||
str.append("\n");
|
||||
str.append(tab(Encode(item,true)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!first) str.append(", ");
|
||||
str.append(Encode(item,false));
|
||||
str.append(Encode(item,false));
|
||||
}
|
||||
first=false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user