Skip to content

Add option including JSON default value for transcoding #261

Description

@mutexd

Describe the feature

The nice thing about grpc-transcoding is that one can have one grpc-service implementation which can serve both Grpc/REST entry point. However, the JsonPrinter's default behavior excludes default values such as int32:0, string:"". Therefore, a GrpcResponse with
{ "message": "Hello", "status": 0 }
will become like this for REST response.
{ "message": "Hello" }
Even though it's valid in terms of ProtoJSON, it would be nice to have default values because JSON in REST conventionally includes default value like this.

Suggestion: Add an option in build time or even run time for including JsonDefaultValue in grpc-transcoding

Contribution

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions