- All Implemented Interfaces:
QtObjectInterface
,Cloneable
Way to read and write JSON documents
Java wrapper for Qt class QJsonDocument
- Since:
- This class was introduced in Qt 5.0.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enumQJsonDocument::DataValidation
static final class
Result class forfromJson(QByteArray)
static enum
Java wrapper for Qt enumQJsonDocument::JsonFormat
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
SeeQJsonDocument::
BinaryFormatTag -
Constructor Summary
ConstructorDescriptionQJsonDocument
(QJsonArray array) QJsonDocument
(QJsonDocument other) QJsonDocument
(QJsonObject object) -
Method Summary
Modifier and TypeMethodDescriptionfinal QJsonArray
array()
final void
assign
(QJsonDocument other) clone()
Creates and returns a copy of this object.final boolean
equals
(QJsonDocument other) boolean
static QJsonDocument
fromBinaryData
(byte [] data) Overloaded function forfromBinaryData(byte[], io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
.static QJsonDocument
fromBinaryData
(byte [] data, QJsonDocument.DataValidation validation) Overloaded function forfromBinaryData(io.qt.core.QByteArray, io.qt.core.QJsonDocument.DataValidation)
.static QJsonDocument
fromBinaryData
(QByteArray data) Overloaded function forfromBinaryData(io.qt.core.QByteArray, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
.static QJsonDocument
fromBinaryData
(QByteArray data, QJsonDocument.DataValidation validation) static QJsonDocument.FromJsonResult
fromJson
(byte [] json) Overloaded function forfromJson(io.qt.core.QByteArray)
.static QJsonDocument.FromJsonResult
fromJson
(QByteArray json) static QJsonDocument
fromRawData
(byte [] data) Overloaded function forfromRawData(byte[], QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData
(byte [] data, QJsonDocument.DataValidation validation) Overloaded function forfromRawData(java.nio.ByteBuffer, int, QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData
(String data) Overloaded function forfromRawData(String, QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData
(String data, QJsonDocument.DataValidation validation) Overloaded function forfromRawData(byte[], QJsonDocument.DataValidation)
.static QJsonDocument
fromRawData
(ByteBuffer data, int size) Overloaded function forfromRawData(java.nio.ByteBuffer, int, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
.static QJsonDocument
fromRawData
(ByteBuffer data, int size, QJsonDocument.DataValidation validation) static QJsonDocument
fromVariant
(Object variant) final QJsonValue
get
(int i) final QJsonValue
final QJsonValue
getArrayValue
(int i) Delegate forget(int)
.final QJsonValue
getObjectValue
(String key) Delegate forget(java.lang.String)
.int
hashCode()
Returns the objects's hash code computed byqHash(QJsonDocument)
.final boolean
isArray()
final boolean
isEmpty()
final boolean
isNull()
final boolean
isObject()
final QJsonObject
object()
final byte []
rawData()
void
readFrom
(QDataStream arg__1) Seeoperator>>(QDataStream&,
QJsonDocument&) final void
setArray
(QJsonArray array) final void
setObject
(QJsonObject object) final void
swap
(QJsonDocument other) final QByteArray
final QByteArray
toJson()
final QByteArray
toJson
(QJsonDocument.JsonFormat format) toString()
Seeoperator<<(QDebug,
QJsonDocument) final Object
void
writeTo
(QDataStream arg__1) Seeoperator<<(QDataStream&,
QJsonDocument) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Field Details
-
BinaryFormatTag
public static final int BinaryFormatTagSee
QJsonDocument::
BinaryFormatTag
-
-
Constructor Details
-
QJsonDocument
public QJsonDocument() -
QJsonDocument
- Parameters:
array
-
-
QJsonDocument
- Parameters:
other
-
-
QJsonDocument
- Parameters:
object
-
-
-
Method Details
-
array
- Returns:
-
isArray
- Returns:
-
isEmpty
- Returns:
-
isNull
- Returns:
-
isObject
- Returns:
-
object
- Returns:
-
writeTo
See
operator<<(QDataStream&,
QJsonDocument) - Parameters:
arg__1
-
-
assign
- Parameters:
other
-
-
equals
- Parameters:
other
-- Returns:
-
readFrom
See
operator>>(QDataStream&,
QJsonDocument&) - Parameters:
arg__1
-
-
get
- Parameters:
key
-- Returns:
- Since:
- This function was introduced in Qt 5.14.
-
get
- Parameters:
i
-- Returns:
- Since:
- This function was introduced in Qt 5.10.
-
rawData
- Returns:
-
setArray
- Parameters:
array
-
-
setObject
- Parameters:
object
-
-
swap
- Parameters:
other
-- Since:
- This function was introduced in Qt 5.10.
-
toBinaryData
- Returns:
-
toJson
- Returns:
-
toJson
- Parameters:
format
-- Returns:
- Since:
- This function was introduced in Qt 5.1.
-
toVariant
- Returns:
-
fromBinaryData
public static QJsonDocument fromBinaryData(QByteArray data, QJsonDocument.DataValidation validation) - Parameters:
data
-validation
-- Returns:
-
fromJson
- Parameters:
json
-- Returns:
-
fromRawData
public static QJsonDocument fromRawData(ByteBuffer data, int size, QJsonDocument.DataValidation validation) - Parameters:
data
-size
-validation
-- Returns:
-
fromVariant
- Parameters:
variant
-- Returns:
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QJsonDocument)
. -
fromRawData
Overloaded function for
fromRawData(String, QJsonDocument.DataValidation)
. -
fromRawData
@QtUninvokable public static QJsonDocument fromRawData(String data, QJsonDocument.DataValidation validation) Overloaded function for
fromRawData(byte[], QJsonDocument.DataValidation)
. -
fromRawData
Overloaded function for
fromRawData(byte[], QJsonDocument.DataValidation)
. -
fromRawData
@QtUninvokable public static QJsonDocument fromRawData(byte [] data, QJsonDocument.DataValidation validation) Overloaded function for
fromRawData(java.nio.ByteBuffer, int, QJsonDocument.DataValidation)
. -
toString
See
operator<<(QDebug,
QJsonDocument) -
clone
Creates and returns a copy of this object.
-
getObjectValue
Delegate for
get(java.lang.String)
. -
getArrayValue
Delegate for
get(int)
. -
fromBinaryData
Overloaded function for
fromBinaryData(io.qt.core.QByteArray, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
. -
fromBinaryData
Overloaded function for
fromBinaryData(byte[], io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
. -
fromBinaryData
Overloaded function for
fromBinaryData(io.qt.core.QByteArray, io.qt.core.QJsonDocument.DataValidation)
. -
fromJson
Overloaded function for
fromJson(io.qt.core.QByteArray)
. -
fromRawData
Overloaded function for
fromRawData(java.nio.ByteBuffer, int, io.qt.core.QJsonDocument.DataValidation)
withvalidation = io.qt.core.QJsonDocument.DataValidation.Validate
.
-