Closed gw0 closed 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.
Ok, out of scope sounds reasonable.
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).