1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Rename toJson to toString/toCompactString for consistency

This commit is contained in:
Ivan Savenko
2024-02-12 01:22:16 +02:00
parent a2b8eaf7fb
commit 54796c7c56
22 changed files with 45 additions and 36 deletions

View File

@ -254,7 +254,7 @@ void ClientCommandManager::handleGetConfigCommand()
const boost::filesystem::path filePath = contentOutPath / (name + ".json");
std::ofstream file(filePath.c_str());
file << object.toJson();
file << object.toString();
}
}
}
@ -358,7 +358,7 @@ void ClientCommandManager::handleBonusesCommand(std::istringstream & singleWordB
auto format = [outputFormat](const BonusList & b) -> std::string
{
if(outputFormat == "json")
return b.toJsonNode().toJson(true);
return b.toJsonNode().toCompactString();
std::ostringstream ss;
ss << b;