- All Implemented Interfaces:
QtObjectInterface
,Cloneable
Way to read and write JSON documents
Java wrapper for Qt's class QJsonDocument
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enum QJsonDocument::DataValidationstatic final class
Result class forfromJson(io.qt.core.QByteArray)
static enum
Java wrapper for Qt enum QJsonDocument::JsonFormatNested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionQJsonDocument
(QJsonArray array) QJsonDocument
(QJsonDocument other) QJsonDocument
(QJsonObject object) protected
Constructor for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionfinal QJsonArray
array()
clone()
boolean
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.static QJsonDocument
fromBinaryData
(QByteArray data) Deprecated.Use CBOR format insteadstatic QJsonDocument
fromBinaryData
(QByteArray data, QJsonDocument.DataValidation validation) Deprecated.Use CBOR format insteadstatic QJsonDocument.FromJsonResult
fromJson
(QByteArray json) static QJsonDocument
fromRawData
(byte[] data) Overloaded function forinvalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
static QJsonDocument
fromRawData
(byte[] data, QJsonDocument.DataValidation validation) Overloaded function forinvalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
static QJsonDocument
fromRawData
(String data) Overloaded function forinvalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
static QJsonDocument
fromRawData
(String data, QJsonDocument.DataValidation validation) Overloaded function forinvalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
static QJsonDocument
fromRawData
(ByteBuffer data, int size) Deprecated.Use CBOR format insteadstatic QJsonDocument
fromRawData
(ByteBuffer data, int size, QJsonDocument.DataValidation validation) Deprecated.Use CBOR format insteadstatic QJsonDocument
fromVariant
(Object variant) final QJsonValue
getArrayValue
(int i) final QJsonValue
getObjectValue
(String key) int
hashCode()
final boolean
isArray()
final boolean
isEmpty()
final boolean
isNull()
final boolean
isObject()
final QJsonObject
object()
final byte[]
rawData()
Deprecated.Use CBOR format insteadvoid
readFrom
(QDataStream arg__1) final void
setArray
(QJsonArray array) final void
setObject
(QJsonObject object) final void
swap
(QJsonDocument other) final QByteArray
Deprecated.Use CBOR format insteadfinal QByteArray
toJson()
final QByteArray
toJson
(QJsonDocument.JsonFormat format) toString()
final Object
void
writeTo
(QDataStream arg__1) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Field Details
-
BinaryFormatTag
public static final int BinaryFormatTag
-
-
Constructor Details
-
QJsonDocument
public QJsonDocument() -
QJsonDocument
-
QJsonDocument
-
QJsonDocument
-
QJsonDocument
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
array
-
isArray
-
isEmpty
-
isNull
-
isObject
-
object
-
writeTo
-
readFrom
-
getObjectValue
-
getArrayValue
-
rawData
Deprecated.Use CBOR format instead -
setArray
-
setObject
-
swap
-
toBinaryData
Deprecated.Use CBOR format instead -
toJson
-
toJson
-
toVariant
-
fromBinaryData
Deprecated.Use CBOR format insteadOverloaded function for
fromBinaryData(io.qt.core.QByteArray, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
. -
fromBinaryData
@Deprecated public static QJsonDocument fromBinaryData(QByteArray data, QJsonDocument.DataValidation validation) Deprecated.Use CBOR format instead -
fromJson
-
fromRawData
Deprecated.Use CBOR format insteadOverloaded function for
fromRawData(java.nio.ByteBuffer, int, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
. -
fromRawData
@Deprecated public static QJsonDocument fromRawData(ByteBuffer data, int size, QJsonDocument.DataValidation validation) Deprecated.Use CBOR format instead -
fromVariant
-
equals
Description copied from class:QtObject
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface. Otherwise it will return the result of calling the super class implementation. -
hashCode
-
fromRawData
Overloaded function for
invalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
-
fromRawData
Overloaded function for
invalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
-
fromRawData
Overloaded function for
invalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
-
fromRawData
Overloaded function for
invalid @link
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
-
toString
-
clone
-