From ba86d16e78588d75662bd074cb3fc84b8f006d97 Mon Sep 17 00:00:00 2001 From: buinsky Date: Thu, 29 Jan 2015 17:04:11 +0300 Subject: [PATCH] Use compact style of JSON data --- src/webui/jsonutils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webui/jsonutils.h b/src/webui/jsonutils.h index 97702d88d..b8619dc66 100644 --- a/src/webui/jsonutils.h +++ b/src/webui/jsonutils.h @@ -45,9 +45,11 @@ namespace json { inline QByteArray toJson(const QVariant& var) { #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) - return QJsonDocument::fromVariant(var).toJson(); + return QJsonDocument::fromVariant(var).toJson(QJsonDocument::Compact); #else - return QJson::Serializer().serialize(var); + QJson::Serializer serializer; + serializer.setIndentMode(QJson::IndentCompact); + return serializer.serialize(var); #endif }