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

Protobuf parse should support parsing JSON object containing JSON Null.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.27.0
    • stout
    • Mesosphere Sprint 26
    • 1

    Description

      (This bug was exposed by MESOS-4184, when serializing docker v1 image manifest as protobuf).

      Currently protobuf::parse returns failures when parsing any JSON containing JSON::Null. If we have any protobuf field set as `JSON::Null`, any other non-repeated field cannot capture their value. For example, assuming we have a protobuf message:

      message Nested {
        optional string str = 1;
        repeated string json_null = 2;
      }
      

      If there exists any field containing JSON::Null, like below:

            {
              \"str\": \"message\",
              \"json_null\": null
            }
      

      When we do protobuf::parse, it would return the following failure:

      Failure parse: Not expecting a JSON null
      

      Attachments

        Issue Links

          Activity

            People

              gilbert Gilbert Song
              gilbert Gilbert Song
              Benjamin Mahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: