QProtobufJsonSerializer Class | Qt Protobuf 6.8.0
Description: The QProtobufJsonSerializer class is an interface that represents basic functions for serialization/deserialization of QProtobufMessage objects to JSON.

- Qt 6.8
- Qt Protobuf
- C++ Classes
- QtProtobuf (Technical Preview)
- QProtobufJsonSerializer
- Qt 6.8.0 Reference Documentation

# 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
Status: | Technical Preview

- List of all members, including inherited members

## Reimplemented Public Functions

virtual QAbstractProtobufSerializer::DeserializationError | deserializationError() const override
virtual QString | deserializationErrorString() 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::DeserializationError QProtobufJsonSerializer::deserializationError() const

Returns the last deserialization error.

### `[override virtual]` QString QProtobufJsonSerializer::deserializationErrorString() const

Returns a human-readable string describing the last deserialization error. If there was no error, an empty string is returned.