Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1194

protobuf-JSON rendering doesnt validate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reviewable
    • Minor
    • Resolution: Unresolved
    • 0.19.0
    • None
    • stout

    Description

      When using JSON::Protobuf(Message&), the supplied protobuf is not checked for being properly initialized, hence e.g. required fields could be missing.

      It would be desirable to have a feedback mechanism in place for this constructor - maybe this would do:

      if (!message.IsInitialized()) { 
        std::cerr << "Protobuf not initialized: " << message.InitializationErrorString() << std::endl;
        abort();
      }
      

      Attachments

        Activity

          People

            Akanksha08 Akanksha Agrawal
            tillt Till Toenshoff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: