Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

QProtobufJsonSerializer Class

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

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

Reimplemented Public Functions

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

Detailed Description

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 directly.

Member Function Documentation

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

Reimplements: QAbstractProtobufSerializer::lastError() const.

Returns the last deserialization error for the serializer instance.

See also lastErrorString().

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

Reimplements: QAbstractProtobufSerializer::lastErrorString() const.

Returns the last deserialization error string for the serializer instance.

See also lastError().

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded