You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Meng Zhu (JIRA)" <ji...@apache.org> on 2019/07/23 01:58:00 UTC

[jira] [Created] (MESOS-9901) Specialize jsonify for protobuf Maps.

Meng Zhu created MESOS-9901:
-------------------------------

             Summary: Specialize jsonify for protobuf Maps.
                 Key: MESOS-9901
                 URL: https://issues.apache.org/jira/browse/MESOS-9901
             Project: Mesos
          Issue Type: Improvement
          Components: json api
            Reporter: Meng Zhu


Jsonify current treats protobuf as a regular repeated field. For example, for the schema 

{noformat}
message QuotaConfig {
  required string role = 1;

  map<string, Value.Scalar> guarantees = 2;
  map<string, Value.Scalar> limits = 3;
}
{noformat}

it will produce:

{noformat}
      "configs": [
        {
          "role": "role1",
          "guarantees": [
            {
              "key": "cpus",
              "value": {
                "value": 1
              }
            },
            {
              "key": "mem",
              "value": {
                "value": 512
              }
            }
          ]
{noformat}

This output cannot be parsed back to proto messages. We need to specialize jsonify for Maps type. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)