Allow customization of server and client codecs#192
Merged
anuraaga merged 2 commits intoconnectrpc:mainfrom Mar 28, 2026
Merged
Allow customization of server and client codecs#192anuraaga merged 2 commits intoconnectrpc:mainfrom
anuraaga merged 2 commits intoconnectrpc:mainfrom
Conversation
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
192ad7c to
9c14bba
Compare
stefanvanburen
approved these changes
Mar 27, 2026
Member
stefanvanburen
left a comment
There was a problem hiding this comment.
nice, that was easier than I thought it would be.
Member
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
stefanvanburen
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #189
This allows setting the list of codecs supported by a server and the codec used by a client. It accepts a breaking change to the
proto_jsonbool that has always known it wasn't the right knob for the job.This should satisfy use cases like customizing JSON marshaling. I considered adding parameters to
ProtoJSONCodecto correspond withMessageToJson, but have left it for the future as it's not hard to copy it and provide the parameters directly.In terms of allowing different protobuf runtimes, the core runtime only depends on
google.protobufoutside of codecs for error details. I think it can be possible to abstract that but will do that independently of this change to provide the basic functionality.