Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
The method QProtobufMessage::unknownFieldNumbers() is useful for detecting discrepancies between the parser and the writer of a protobuf message. A similar capability appears to be missing when using QProtobufJsonSerializer.
To provide comparable functionality, it is proposed to introduce a method such as:
QList<QJsonObject> QProtobufMessage::unknownJsonFields();
This would enable detection of unknown or unexpected fields during JSON deserialization—particularly valuable in scenarios where JSON input is composed manually or without protoc-generated code. Such a feature would help identify mis-typed or unintended field names, ensuring greater reliability and validation in JSON message handling.