QProtobufJsonSerializer Class

The QProtobufJsonSerializer class is an interface that represents basic functions for serialization/deserialization of QProtobufMessage objects to JSON. 更多...

頭: #include <QProtobufJsonSerializer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
Since: Qt 6.7
繼承: QAbstractProtobufSerializer

重實現公共函數

virtual QAbstractProtobufSerializer::Error lastError () const override
virtual QString lastErrorString () const override

詳細描述

The QProtobufJsonSerializer class registers serializers/deserializers for classes implementing a protobuf message, inheriting QProtobufMessage . These classes are generated automatically, based on a .proto file, using the CMake function qt_add_protobuf or by running qtprotobufgen 直接。

成員函數文檔編製

[override virtual] QAbstractProtobufSerializer::Error QProtobufJsonSerializer:: lastError () const

重實現: QAbstractProtobufSerializer::lastError () const.

Returns the last deserialization error for the serializer instance.

另請參閱 lastErrorString ().

[override virtual] QString QProtobufJsonSerializer:: lastErrorString () const

重實現: QAbstractProtobufSerializer::lastErrorString () const.

Returns the last deserialization error string for the serializer instance.

另請參閱 lastError ().