spring-projects / spring-projects/spring-grpc

Support for gRPC-JSON Transcoding

Open
#339 28 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
413
Forks
95
Avg merge
4d 6h
Merged PRs (30d)
2

Description

Many gRPC services need to be exposed as RESTful JSON APIs to support legacy clients, frontend applications, or public APIs that do not support gRPC natively. Currently, users often have to set up a separate proxy (like Envoy) or use a separate gateway service just to handle this translation.

I would like to propose adding support for gRPC-JSON Transcoding directly within spring-grpc. This feature allows mapping JSON/HTTP requests to gRPC methods using configuration (often via google.api.http annotations in Protobuf).

This concept is well-documented in Google Cloud Endpoints: Transcoding HTTP/JSON to gRPC.

Currently, other ecosystems and frameworks within the Java landscape provide this functionality:

  • Armeria: Provides built-in support for serving gRPC and REST/JSON from the same port.
  • Spring Cloud Gateway: Offers a JsonToGrpc filter factory to act as a transcoding gateway.

Having native support or a dedicated starter in spring-grpc (e.g., essentially embedded transcoding capability) would greatly simplify the architecture for Spring Boot developers who want to expose their gRPC services over HTTP/JSON without maintaining a separate Gateway component.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Google Cloud transcoding documentation and compare the Armeria and Spring Cloud Gateway approaches mentioned in the issue. Determine the intended native support or dedicated starter scope, including how google.api.http annotations would be handled; done requires an agreed design and implementation boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, java
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.