Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Resource Mgmt: RI-16 51
-
3
Description
Jsonify current treats protobuf as a regular repeated field. For example, for the schema
message QuotaConfig { required string role = 1; map<string, Value.Scalar> guarantees = 2; map<string, Value.Scalar> limits = 3; }
it will produce:
{ "configs": [ { "role": "role1", "guarantees": [ { "key": "cpus", "value": { "value": 1 } }, { "key": "mem", "value": { "value": 512 } } ] } ] }
This output cannot be parsed back to proto messages. We need to specialize jsonify for Maps type to get the standard output:
{ "configs": [ { "role": "role1", "guarantees": { "cpus": 1, "mem": 512 } } ] }
Attachments
Issue Links
- relates to
-
MESOS-9896 Consider using protobuf provided json conversion facilities rather than custom ones.
- Accepted