title: is it a good way to declare a string field as JSON in gRPC proto?
body: <p>Since it is quiet trouble some in protobuf to define a flexible structure in some scenario.</p>
  <p>for example:</p>
  <pre><code>message Foo {
     int a = 1;
     repeated int a_other = 2;
  }
  </code></pre>
  <p>In fact, I don't want the service's client to pass the <code>a</code> and the <code>a_other</code> at the same time.
  However in protobuf, we can't put these two fields in <code>oneof</code> because the <code>a_other</code> is a list field.
  So with the above message declared, when we only pass the <code>a_other</code> field, the client side cannot tell if the <code>a</code> field is actually 0 or not passed by the server.</p>
  <p>So I wonder if define a string field for <code>Foo</code> like:</p>
  <pre><code>message Foo {
     string data = 1;
  }
  </code></pre>
  <p>and both the server side and the client side is agreed to treat the <code>data</code> field as a JSON. So the server dumps the primitive data and the client loads it, and they live happily ever after.</p>
  <p>But my question is, is it a common practice to do that? And what is the disadvantage of it? (this way drop the type check of course) Or is there a better way?</p>