Support Content Negotiation using the Content-Type: application/grpc+memorypack header
GRPC already specifies that you can switch serializers using the application/grpc+proto and the application/grpc+json content types.
Does this mean you want support for dual mode with MessagePack and MemoryPack?
Why not? Additionally, why not add protobuf for actual gRPC on top.
On Thu, 4 Dec 2025, 14:25 Mayuki Sawatari, @.***> wrote:
mayuki left a comment (Cysharp/MagicOnion#982) https://github.com/Cysharp/MagicOnion/issues/982#issuecomment-3610507402
Does this mean you want support for dual mode with MessagePack and MemoryPack?
— Reply to this email directly, view it on GitHub https://github.com/Cysharp/MagicOnion/issues/982#issuecomment-3610507402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA46MLPBNEQPHO6YNXGGRH3377HVRAVCNFSM6AAAAACHTJLJRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMJQGUYDONBQGI . You are receiving this because you authored the thread.Message ID: @.***>
This relates to how ASP.NET Core handles endpoints and how grpc-dotnet handles methods.
ASP.NET Core does not support content negotiation within the same endpoint.
grpc-dotnet also handles handler and marshaller (serialization) as a single Method unit. Therefore, it is also difficult to perform routing on the gRPC method handler side.
While using MapWhen might allow handling multiple endpoints, the current MagicOnion implementation does not support customizing serializers per endpoint.