이 페이지에서

QProtobufJsonSerializer Class

QProtobufJsonSerializer 클래스는 QProtobufMessage 객체를 JSON으로 직렬화/역직렬화하는 기본 기능을 나타내는 인터페이스입니다. 더 보기...

헤더: #include <QProtobufJsonSerializer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
다음부터: Qt 6.7
상속: QAbstractProtobufSerializer

재구현된 공개 함수

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

상세 설명

QProtobufJsonSerializer 클래스는 QProtobufMessage 를 상속하여 protobuf 메시지를 구현하는 클래스에 대한 직렬화기/역직렬화기를 등록합니다. 이러한 클래스는 .proto 파일을 기반으로 CMake 함수 qt_add_protobuf를 사용하거나 qtprotobufgen을 직접 실행하여 자동으로 생성됩니다.

멤버 함수 문서

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

QAbstractProtobufSerializer::lastError() const를 재구현합니다.

시리얼라이저 인스턴스에 대해 발생한 마지막 역직렬화 오류를 반환합니다.

lastErrorString()도 참조하십시오 .

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

QAbstractProtobufSerializer::lastErrorString() const를 재구현합니다.

시리얼라이저 인스턴스에 대한 마지막 역직렬화 오류 문자열을 반환합니다.

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.