You can simply specify a different Accept tag in your HTTP request that describes the mime type for the serialization you want. Here's how it works in the Python SDK for Cloud Endpoints, at least.
For example, if you specify the Accept application/json header, Cloud Endpoints should automatically use the built-in JSON converter to serialize the response. It so happens that JSON-mapper is used if no other serialization is specified.
The mime type for responses encoded by protobuf is semi-standardized as application/protobuf (see https://tools.ietf.org/html/draft-rfernando-protocol-buffers-00 ). I would use this in your Accept header and see if you get the desired answer.
source share