Use compact format for JSON files

It saves a bit of space on disk and deters novice users from tampering them.

PR #22211.
This commit is contained in:
Chocobo1
2025-01-29 15:31:06 +08:00
committed by GitHub
parent af65ddd012
commit f8536162f2
2 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ void RSS::Private::FeedSerializer::store(const Path &dataFileName, const QList<Q
arr << jsonObj;
}
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(dataFileName, QJsonDocument(arr).toJson());
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(dataFileName, QJsonDocument(arr).toJson(QJsonDocument::Compact));
if (!result)
{
LogMsg(tr("Failed to save RSS feed in '%1', Reason: %2").arg(dataFileName.toString(), result.error())