- All Implemented Interfaces:
QtObjectInterface
,Cloneable
public class QJsonDocument extends QtObject implements Cloneable
Way to read and write JSON documents
Java wrapper for Qt class QJsonDocument
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QJsonDocument.DataValidation
Java wrapper for Qt enum QJsonDocument::DataValidationstatic class
QJsonDocument.FromJsonResult
Result class forfromJson(io.qt.core.QByteArray)
static class
QJsonDocument.JsonFormat
Java wrapper for Qt enum QJsonDocument::JsonFormat -
Constructor Summary
Constructors Modifier Constructor Description QJsonDocument()
QJsonDocument(QJsonArray array)
QJsonDocument(QJsonDocument other)
QJsonDocument(QJsonObject object)
protected
QJsonDocument(QtObject.QPrivateConstructor p)
Constructor for internal use only. -
Method Summary
Modifier and Type Method Description QJsonArray
array()
static int
BinaryFormatTag()
QJsonDocument
clone()
boolean
equals(Object other)
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 for#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData(byte[] data, QJsonDocument.DataValidation validation)
Overloaded function for#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData(String data)
Overloaded function for#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData(String data, QJsonDocument.DataValidation validation)
Overloaded function for#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)
QJsonValue
getArrayValue(int i)
QJsonValue
getObjectValue(String key)
int
hashCode()
boolean
isArray()
boolean
isEmpty()
boolean
isNull()
boolean
isObject()
QJsonObject
object()
byte[]
rawData()
Deprecated.Use CBOR format insteadvoid
readFrom(QDataStream arg__1)
void
setArray(QJsonArray array)
void
setObject(QJsonObject object)
void
swap(QJsonDocument other)
QByteArray
toBinaryData()
Deprecated.Use CBOR format insteadQByteArray
toJson()
QByteArray
toJson(QJsonDocument.JsonFormat format)
String
toString()
Object
toVariant()
void
writeTo(QDataStream arg__1)
-
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
-
BinaryFormatTag
public static int BinaryFormatTag() -
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
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
. -
fromRawData
Overloaded function for
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
. -
fromRawData
Overloaded function for
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
. -
fromRawData
Overloaded function for
#fromRawData(java.nio.ByteBuffer, io.qt.core.QJsonDocument.DataValidation)
. -
toString
-
clone
-