title: Alternatives to protobuf's json_format to convert protobuf message to json
body: <p>In protobuf's python implementation, Google protobuf provides a built-in class, json_formatter to convert a protobuf message to a Dict/Json type, e.g., MessageToDict &amp; MessageToJson</p>
  
  <p>Described in <a href="https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/json-formatter" rel="nofollow noreferrer">https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/json-formatter</a></p>
  
  <p>The built-in method generally works well, but becomes very slow when the data gets a bit bigger.</p>
  
  <p>Through the link I mentioned above, google said 'This is a simple start to get JSON formatting working. As it's reflection-based, it's not as quick as baking calls into generated messages - but is a simpler implementation. (This code is generally not heavily optimized.)'</p>
  
  <p>Therefore, I wonder if there's any alternative to this that could somehow make it faster, or a 'more heavily optimized code' somewhere? Thanks</p>
  
  <p>Edit: The accepted MIMETYPE for the API are application/protobuf or application/json. Wanted to improve performance on requests whose mimetype specified is application/json.</p>