In questa pagina

QProtobufJsonSerializer Class

La classe QProtobufJsonSerializer è un'interfaccia che fornisce le funzioni di base per la serializzazione e la deserializzazione di oggetti QProtobufMessage in formato JSON. Per saperne di più...

Intestazione: #include <QProtobufJsonSerializer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
Da: Qt 6.7
Eredita da: QAbstractProtobufSerializer

Funzioni pubbliche reimplementate

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

Descrizione dettagliata

La classe QProtobufJsonSerializer registra serializzatori/deserializzatori per le classi che implementano un messaggio protobuf, ereditando d QProtobufMessage. Queste classi vengono generate automaticamente, sulla base di un file .proto, utilizzando la funzione CMake qt_add_protobuf o eseguendo direttamente qtprotobufgen.

Documentazione delle funzioni membro

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

Reimplementa: ` QAbstractProtobufSerializer::lastError()` const.

Restituisce l'ultimo errore di deserializzazione per l'istanza del serializzatore.

Vedi anche lastErrorString().

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

Reimplementa: ` QAbstractProtobufSerializer::lastErrorString()` const.

Restituisce la stringa dell'ultimo errore di deserializzazione per l'istanza del serializzatore.

Vedi anche 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.