-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QJson: Move parsing from QJsonDocument to QJsonValue
JSON values are now parsed by QJsonValue instead of QJsonDocument. For parsing, this removes the need for QJsonDocument entirely. Fixes: QTBUG-109870 Change-Id: I2f9bae3a53e5d445cc9e8437c63a53a2c7b3593e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Loading branch information
Showing
6 changed files
with
232 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (C) 2024 The Qt Company Ltd. | ||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only | ||
|
||
#ifndef QJSONPARSEERROR_H | ||
#define QJSONPARSEERROR_H | ||
|
||
#include <QtCore/qtconfigmacros.h> | ||
#include <QtCore/qtcoreexports.h> | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
class QString; | ||
|
||
struct Q_CORE_EXPORT QJsonParseError | ||
{ | ||
enum ParseError { | ||
NoError = 0, | ||
UnterminatedObject, | ||
MissingNameSeparator, | ||
UnterminatedArray, | ||
MissingValueSeparator, | ||
IllegalValue, | ||
TerminationByNumber, | ||
IllegalNumber, | ||
IllegalEscapeSequence, | ||
IllegalUTF8String, | ||
UnterminatedString, | ||
MissingObject, | ||
DeepNesting, | ||
DocumentTooLarge, | ||
GarbageAtEnd | ||
}; | ||
|
||
QString errorString() const; | ||
|
||
int offset = -1; | ||
ParseError error = NoError; | ||
}; | ||
|
||
QT_END_NAMESPACE | ||
|
||
#endif // QJSONPARSEERROR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.