En esta página

QProtobufJsonSerializer Class

La clase QProtobufJsonSerializer es una interfaz que representa funciones básicas para la serialización/deserialización de objetos QProtobufMessage a JSON. Más...

Cabecera: #include <QProtobufJsonSerializer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
Desde: Qt 6.7
Hereda: QAbstractProtobufSerializer

Funciones Públicas Reimplementadas

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

Descripción Detallada

La clase QProtobufJsonSerializer registra serializadores/deserializadores para clases que implementan un mensaje protobuf, heredando QProtobufMessage. Estas clases se generan automáticamente, basándose en un archivo .proto, utilizando la función de CMake qt_add_protobuf o ejecutando qtprotobufgen directamente.

Documentación de las funciones miembro

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

Reimplementa: QAbstractProtobufSerializer::lastError() const.

Devuelve el último error de deserialización de la instancia del serializador.

Véase también lastErrorString().

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

Reimplementa: QAbstractProtobufSerializer::lastErrorString() const.

Devuelve la última cadena de error de deserialización para la instancia del serializador.

Véase también lastError().

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.