Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qjsonparser_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:header-decls-only
4
5#ifndef QJSONPARSER_P_H
6#define QJSONPARSER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/private/qglobal_p.h>
20#include <QtCore/private/qcborvalue_p.h>
21#include <QtCore/qjsondocument.h>
22#include <QtCore/qutf8stringview.h>
23
25
26namespace QJsonPrivate {
27
28class Parser
29{
30public:
31 explicit Parser(QUtf8StringView json);
32
33 QCborValue parse(QJsonParseError *error);
34
35private:
36 inline void eatBOM();
37 inline bool eatSpace();
38 inline char nextToken();
39
40 bool parseObject();
41 bool parseArray();
42 bool parseMember();
43 bool parseString();
44 bool parseValueIntoContainer();
45 QCborValue parseValue();
46 QCborValue parseNumber();
47 const char *head;
48 const char *json;
49 const char *end;
50
51 int nestingLevel;
52 QJsonParseError::ParseError lastError;
53 QExplicitlySharedDataPointer<QCborContainerPrivate> container;
54};
55
56}
57
58QT_END_NAMESPACE
59
60#endif
QJsonDocumentPrivate()=default
QJsonDocumentPrivate(QCborValue data)
QCborValue parse(QJsonParseError *error)
Parser(QUtf8StringView json)
Combined button and popup list for selecting options.
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
bool comparesEqual(const QFileInfo &lhs, const QFileInfo &rhs)