7#include <QtCore/qglobal.h>
8#include <QtCore/qstring.h>
9#include <QtCore/qshareddata.h>
10#include <QtCore/qcborvalue.h>
43#ifndef QT_NO_CAST_FROM_ASCII
79 bool toBool(
bool defaultValue =
false)
const;
80 int toInt(
int defaultValue = 0)
const;
82 double toDouble(
double defaultValue = 0)
const;
122 inline operator QJsonValue()
const {
return concrete(*
this); }
134 bool toBool(
bool defaultValue =
false)
const
135 {
return concreteBool(*
this, defaultValue); }
136 int toInt(
int defaultValue = 0)
const
137 {
return int(concreteInt(*
this, defaultValue,
true)); }
139 {
return concreteInt(*
this, defaultValue,
false); }
141 {
return concreteDouble(*
this, defaultValue); }
143 {
return concreteString(*
this, defaultValue); }
157 Q_CORE_EXPORT
static bool
159 Q_CORE_EXPORT
static qint64
161 Q_CORE_EXPORT
static double
170#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
210 size_t index : std::numeric_limits<size_t>::digits - 1;
227#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
236 operator QJsonValue()
const {
return toValue(); }
266 using QJsonValueConstRef::operator[];
274 QT7_ONLY(Q_CORE_EXPORT)
void detach();
288{
return !(lhs == rhs); }
293{
return !(lhs == rhs); }
298{
return !(lhs == rhs); }
302#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
306#ifndef QT_NO_DATASTREAM
QCborValue concrete() const noexcept
QJsonValue toJsonValue() const
\inmodule QtCore\reentrant
QCborArray toArray() const
QJsonValue toJsonValue() const
Converts this QCborValue object to an equivalent representation in JSON and returns it as a QJsonValu...
Type
This enum represents the QCborValue type.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QJsonValueConstRef(QCborContainerPrivate *d, size_t index, bool is_object)
const QJsonValue operator[](QLatin1StringView key) const
bool operator==(const QJsonValue &other) const
bool operator!=(const QJsonValue &other) const
void rebind(QJsonValueConstRef other)
QString objectKey() const
QJsonValueConstRef(const QJsonValueConstRef &)=default
qint64 toInteger(qint64 defaultValue=0) const
bool toBool(bool defaultValue=false) const
QJsonValueConstRef & operator=(const QJsonValueConstRef &)=delete
QString toString(const QString &defaultValue={}) const
QJsonValue::Type type() const
const QJsonValue operator[](qsizetype i) const
double toDouble(double defaultValue=0) const
int toInt(int defaultValue=0) const
const QJsonValue operator[](QStringView key) const
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
QT_ASCII_CAST_WARN QJsonValue(const char *s)
Creates a value of type String with value s, assuming UTF-8 encoding of the input.
bool isBool() const
Returns true if the value contains a boolean.
bool isString() const
Returns true if the value contains a string.
bool isDouble() const
Returns true if the value contains a double.
bool isNull() const
Returns true if the value is null.
~QJsonValue()
Destroys the value.
QJsonValue(const QJsonValue &other) noexcept
Creates a copy of other.
bool isArray() const
Returns true if the value contains an array.
bool isObject() const
Returns true if the value contains an object.
bool isUndefined() const
Returns true if the value is undefined.
Type
This enum describes the type of the JSON value.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECL_PURE_FUNCTION
#define QT_WARNING_DISABLE_MSVC(number)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool operator==(const QJsonValueConstRef &lhs, const QJsonValueRef &rhs)
bool operator!=(const QJsonValueConstRef &lhs, const QJsonValueRef &rhs)
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QJsonValue &)
Q_CORE_EXPORT size_t qHash(const QJsonValue &value, size_t seed=0)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
QT_BEGIN_NAMESPACE class QT6_ONLY(Q_CORE_EXPORT) QReadWriteLock
#define QT_ASCII_CAST_WARN
unsigned long long quint64
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols, V4ObjectSet *visitedObjects)
static int toInt(const QChar &qc, int R)
static double toDouble(Value v)
char * toString(const MyType &t)
[31]
QT_BEGIN_NAMESPACE bool toBool(const QString &str)