Skip to main content

# Transcoding

- gRPC JSON transcoding vs gRPC-Web
- grpc-gateway - alternative to transcoding

# gRPC JSON transcoding vs gRPC-Web

Both transcoding and gRPC-Web allow gRPC services to be called from a browser. However, the way each does this is different:

- gRPC-Web lets browser apps call gRPC services from the browser with the gRPC-Web client and Protobuf. gRPC-Web requires the browser app to generate a gRPC client and has the advantage of sending small, fast Protobuf messages.
- Transcoding allows browser apps to call gRPC services as if they were RESTful APIs with JSON. The browser app doesn't need to generate a gRPC client or know anything about gRPC. The previous Greeter service can be called using browser JavaScript APIs:

https://learn.microsoft.com/en-us/aspnet/core/grpc/browser?view=aspnetcore-7.0