Skip to content

PythonQt.Qt.QJsonObject

QJsonObject

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

A JSON object is a list of key value pairs, where the keys are unique strings and the values are represented by a QJsonValue.

A QJsonObject can be converted to and from a QVariantMap. You can query the number of (key, value) pairs with size(), insert(), and remove() entries from it and iterate over its content using the standard C++ iterator pattern.

QJsonObject is an implicitly shared class, and shares the data with the document it has been created from as long as it is not being modified.

You can convert the object to and from text based JSON through QJsonDocument.

Source: https://doc.qt.io/archives/qt-5.15/qjsonobject.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
contains function (self, key: Any) -> bool X.contains(key) -> bool (shared captured text)
count function (self) -> int X.count() -> int (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
empty function (self) -> bool X.empty() -> bool (shared captured text)
fromVariantHash function (self, map: Any) -> Any X.fromVariantHash(map) -> PythonQt.QtCore.QJsonObject (shared captured text)
fromVariantMap function (self, map: Any) -> Any X.fromVariantMap(map) -> PythonQt.QtCore.QJsonObject (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
isEmpty function (self) -> bool X.isEmpty() -> bool (shared captured text)
keys function (self) -> tuple X.keys() -> tuple (shared captured text)
length function (self) -> int X.length() -> int (shared captured text)
operator_assign function (self, other: Any) -> Any X.operator_assign(other) -> PythonQt.QtCore.QJsonObject (shared captured text)
operator_subscript function (self, key: Any) -> Any X.operator_subscript(key) -> PythonQt.QtCore.QJsonValue (shared captured text)
remove function (self, key: Any) -> Any Removes key from the object. (shared captured text)
size function (self) -> int X.size() -> int (shared captured text)
take function (self, key: Any) -> Any X.take(key) -> PythonQt.QtCore.QJsonValue (shared captured text)
toVariantHash function (self) -> dict X.toVariantHash() -> dict (shared captured text)
toVariantMap function (self) -> dict X.toVariantMap() -> dict (shared captured text)
value function (self, key: Any) -> Any X.value(key) -> PythonQt.QtCore.QJsonValue (shared captured text)