Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.5
-
None
Description
When doing a QJsonDocument::toJson(), the floating point precision for double/float is set to QLocale::[FloatingPointShortest|https://codebrowser.dev/qt6/qtbase/src/corelib/text/qlocale.h.html#QLocale::FloatingPointShortest] in qjsonwriter.valueToJson. wich cause the json to be quite heavy for no particular reason.
So maybe:
int floatingPointPrecision() const; void setFloatingPointPrecision(int precision) const;
can be added to QJsonDocument (with the default value being QLocale::[FloatingPointShortest|https://codebrowser.dev/qt6/qtbase/src/corelib/text/qlocale.h.html#QLocale::FloatingPointShortest] so that it does not affect existing code bases
Attachments
Issue Links
- relates to
-
QTBUG-129710 Adding QJsonStreamWriter and QJsonStreamReader + Simplifying QCborStreamReader and QCborStreamWriter for QVariant Support
- Open