Make the QJsonDocument::toJson() output compact
- Use the QJsonDocument::Compact option in the
QJsonDocument::toJson() to make output shorter.
As a result, toJson() returns the compact version
of a UTF-8 encoded JSON document (without spaces
and `\n` symbols).
See an example of the compact result below:
{"Array":[true,999,"string"],"Key":"Value","null":null}
Change-Id: I77d7a3662a921afb994493b9fa1f5d928e5f77d5
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
| commit | 421c53e32de96ca8c9f2eb28a2ac62213bd6735b |
| parent | e3ee64b054cedbcdd2611d98107e9e5e1c5857e4 |
| author | Tatiana Borisova <tatiana.borisova@qt.io> |
| committer | Tatiana Borisova <tatiana.borisova@qt.io> |
| commit time | Tue, 5 Aug 2025 12:03:05 +0000 |
- M src/main/resources/cpp-qt6-client/HttpFileElement.cpp.mustache
- M src/main/resources/cpp-qt6-client/model-body.mustache
- M tests/auto/colorpalette/client/client/OAIColor.cpp
- M tests/auto/colorpalette/client/client/OAIColorPage.cpp
- M tests/auto/colorpalette/client/client/OAIHttpFileElement.cpp
- M tests/auto/colorpalette/client/client/OAITestObject.cpp
- M tests/auto/colorpalette/client/client/OAITestOperation_request.cpp
- M tests/auto/colorpalette/client/client/OAIUpdateUser_request.cpp
- M tests/auto/colorpalette/client/client/OAIUser.cpp
- M tests/auto/colorpalette/client/client/OAIUserPage.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIColor.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIColorPage.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIHttpFileElement.cpp
- M tests/auto/colorpalette/qmlclient/client/OAITestObject.cpp
- M tests/auto/colorpalette/qmlclient/client/OAITestOperation_request.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIUpdateUser_request.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIUser.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIUserPage.cpp
- M tests/auto/operation-parameters/client/client/OAIHttpFileElement.cpp
- M tests/auto/operation-parameters/client/client/OAITestObject.cpp
- M tests/auto/petstore/client/client/OAIApiResponse.cpp
- M tests/auto/petstore/client/client/OAICategory.cpp
- M tests/auto/petstore/client/client/OAIHttpFileElement.cpp
- M tests/auto/petstore/client/client/OAIOrder.cpp
- M tests/auto/petstore/client/client/OAIPet.cpp
- M tests/auto/petstore/client/client/OAITag.cpp
- M tests/auto/petstore/client/client/OAIUser.cpp
- M tests/auto/petstore/qmlclient/client/OAIApiResponse.cpp
- M tests/auto/petstore/qmlclient/client/OAICategory.cpp
- M tests/auto/petstore/qmlclient/client/OAIHttpFileElement.cpp
- M tests/auto/petstore/qmlclient/client/OAIOrder.cpp
- M tests/auto/petstore/qmlclient/client/OAIPet.cpp
- M tests/auto/petstore/qmlclient/client/OAITag.cpp
- M tests/auto/petstore/qmlclient/client/OAIUser.cpp