[ 
https://issues.apache.org/jira/browse/MESOS-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15092951#comment-15092951
 ] 

Gilbert Song commented on MESOS-4294:
-------------------------------------

1. https://reviews.apache.org/r/42166/ | Fixed protobuf::parse with JSON null
2. https://reviews.apache.org/r/41943/ | Added test case (for JSON null)

> Protobuf parse should support parsing JSON object containing JSON Null.
> -----------------------------------------------------------------------
>
>                 Key: MESOS-4294
>                 URL: https://issues.apache.org/jira/browse/MESOS-4294
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: Gilbert Song
>            Assignee: Gilbert Song
>              Labels: mesosphere
>
> (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:
> {noformat}
> message Nested {
>   optional string str = 1;
>   repeated string json_null = 2;
> }
> {noformat}
> If there exists any field containing JSON::Null, like below:
> {noformat}
>       {
>         \"str\": \"message\",
>         \"json_null\": null
>       }
> {noformat}
> When we do protobuf::parse, it would return the following failure:
> {noformat}
> Failure parse: Not expecting a JSON null
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to