Can I use MessagePackMashaller and get a json response from swagger? #332
Replies: 3 comments
-
What's stopping you? add the package reference Examples/Swagger/SwashbuckleWebApplication/SwashbuckleWebApplication.csproj <PackageReference Include="ServiceModel.Grpc.MessagePackMarshaller" /> set MessagePackMashaller Examples/Swagger/SwashbuckleWebApplication/Program.cs builder.Services.AddServiceModelGrpc(options => options.DefaultMarshallerFactory = MessagePackMarshallerFactory.Default); |
Beta Was this translation helpful? Give feedback.
-
I can't get the response in json format. Returning single integer value like the example you provided is fine but when returning an object it gives me 'Unrecognized response type: Displaying content as text' seems like message pack binary format is not correctly translated to json format. |
Beta Was this translation helpful? Give feedback.
-
Sharing a simple app that demonstrates what you are trying to achieve would be helpful. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering if that is possible and if there's any other configurations I need to do other than what's stated in the example.
Beta Was this translation helpful? Give feedback.
All reactions