PythonQt.QtCore.QJsonObject · declarations 001
Back to PythonQt.QtCore.QJsonObject
contains
contains(key: Any) -> bool
X.contains(key) -> bool
Supplemental documentation: Qt 5 reference:
bool QJsonObject::contains(const QString \&key) const
Returns true if the object contains key key.
See also insert(), remove(), and take().
bool QJsonObject::contains(QStringView key) const
This is an overloaded function.
This function was introduced in Qt 5.14.
bool QJsonObject::contains(QLatin1String key) const
This is an overloaded function.
This function was introduced in Qt 5.7.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#contains
count
count() -> int
X.count() -> int
Supplemental documentation: Qt 5 reference:
int QJsonObject::count() const
This is an overloaded function.
Same as size().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#count
empty
empty() -> bool
X.empty() -> bool
Supplemental documentation: Qt 5 reference:
bool QJsonObject::empty() const
This function is provided for STL compatibility. It is equivalent to
isEmpty(), returning
true if the object is empty; otherwise returning false.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#empty
fromVariantHash
fromVariantHash(map: Any) -> Any
X.fromVariantHash(map) -> PythonQt.QtCore.QJsonObject
Supplemental documentation: Qt 5 reference:
[static] QJsonObject QJsonObject::fromVariantHash(const QVariantHash \&hash)
Converts the variant hash hash to a QJsonObject.
The keys in hash will be used as the keys in the JSON object, and the QVariant values will be converted to JSON values.
Note: Conversion from QVariant is not completely lossless. Please see the documentation in QJsonValue::fromVariant() for more information.
This function was introduced in Qt 5.5.
See also fromVariantMap(), toVariantHash(), and QJsonValue::fromVariant().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#fromVariantHash
fromVariantMap
fromVariantMap(map: Any) -> Any
X.fromVariantMap(map) -> PythonQt.QtCore.QJsonObject
Supplemental documentation: Qt 5 reference:
[static] QJsonObject QJsonObject::fromVariantMap(const QVariantMap \&map)
Converts the variant map map to a QJsonObject.
The keys in map will be used as the keys in the JSON object, and the QVariant values will be converted to JSON values.
Note: Conversion from QVariant is not completely lossless. Please see the documentation in QJsonValue::fromVariant() for more information.
See also fromVariantHash(), toVariantMap(), and QJsonValue::fromVariant().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#fromVariantMap
isEmpty
isEmpty() -> bool
keys
keys() -> tuple
X.keys() -> tuple
Supplemental documentation: Qt 5 reference:
QStringList QJsonObject::keys() const
Returns a list of all keys in this object.
The list is sorted lexographically.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#keys
length
length() -> int
X.length() -> int
Supplemental documentation: Qt 5 reference:
int QJsonObject::length() const
This is an overloaded function.
Same as size().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#length
operator_assign
operator_assign(other: Any) -> Any
X.operator_assign(other) -> PythonQt.QtCore.QJsonObject
operator_subscript
operator_subscript(key: Any) -> Any
X.operator_subscript(key) -> PythonQt.QtCore.QJsonValue
remove
remove(key: Any) -> Any
X.remove(key)
Supplemental documentation: Qt 5 reference:
void QJsonObject::remove(const QString \&key)
Removes key from the object.
void QJsonObject::remove(QStringView key)
This is an overloaded function.
This function was introduced in Qt 5.14.
void QJsonObject::remove(QLatin1String key)
This is an overloaded function.
This function was introduced in Qt 5.14.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#remove
size
size() -> int
X.size() -> int
Supplemental documentation: Qt 5 reference:
int QJsonObject::size() const
Returns the number of (key, value) pairs stored in the object.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#size
take
take(key: Any) -> Any
X.take(key) -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonObject::take(const QString \&key)
Removes key from the object.
Returns a QJsonValue containing the value referenced by key. If key was not contained in the object, the returned QJsonValue is QJsonValue::Undefined.
See also insert(), remove(), and QJsonValue.
QJsonValue QJsonObject::take(QStringView key)
This is an overloaded function.
This function was introduced in Qt 5.14.
QJsonValue QJsonObject::take(QLatin1String key)
This is an overloaded function.
This function was introduced in Qt 5.14.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#take
toVariantHash
toVariantHash() -> dict
X.toVariantHash() -> dict
Supplemental documentation: Qt 5 reference:
QVariantHash QJsonObject::toVariantHash() const
Converts this object to a QVariantHash.
Returns the created hash.
This function was introduced in Qt 5.5.
See also toVariantMap().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#toVariantHash
toVariantMap
toVariantMap() -> dict
X.toVariantMap() -> dict
Supplemental documentation: Qt 5 reference:
QVariantMap QJsonObject::toVariantMap() const
Converts this object to a QVariantMap.
Returns the created map.
See also toVariantHash().
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#toVariantMap
value
value(key: Any) -> Any
X.value(key) -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonObject::value(const QString \&key) const
Returns a QJsonValue representing the value for the key key.
The returned QJsonValue is QJsonValue::Undefined if the key does not exist.
See also QJsonValue and QJsonValue::isUndefined().
QJsonValue QJsonObject::value(QStringView key) const
This is an overloaded function.
This function was introduced in Qt 5.14.
QJsonValue QJsonObject::value(QLatin1String key) const
This is an overloaded function.
This function was introduced in Qt 5.7.
Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html#value