fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.36k stars 497 forks source link

Support other encoding/decoding codecs (alternatives to protobuf) #345

Closed gw0 closed 1 year ago

gw0 commented 1 year ago

The gRPC protocol does not enforce the use of protobuf as the encoding/decoding codec. For example, one can replace it with Canonical CBOR (https://www.rfc-editor.org/rfc/rfc7049) as used by the Oasis Node (https://docs.oasis.io/core/oasis-node/rpc).

jhump commented 1 year ago

Yes, the gRPC protocol is open and format-agnostic. However, in practice, other formats/codecs outside proto, json, and text (particularly, the protobuf text format) are rarely used.

The crux of grpcurl's functionality and implementation code is around protobuf schema reflection and dynamic RPC. This allows it to discover services that are defined in protobuf services and to translate the widely-used protobuf binary format to/from human-readable JSON. Supporting arbitrary formats/codecs/IDLs/etc is really outside of grpcurl's scope.

gw0 commented 1 year ago

Ok, out of scope sounds reasonable.