Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138243

Support for Retrieving Unknown Fields in QProtobufJsonSerializer

    XMLWordPrintable

Details

    • All

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tatiana.borisova Tatiana Borisova
            chakib Chakib Boutaghane
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes