0

I upgraded my project to .net core 3.1 and upgraded EdjCase.JsonRpc.Router to 4.1.0

I tried a request on postman, everytime request body is null, after upgrading.

I added

        services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);

        services.AddControllers()
           .AddNewtonsoftJson(opt =>
           {
               opt.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
           });
app.UseAuthentication(); 
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
  endpoints.MapControllers();
 });
app.UseAuthentication()
.UseJsonRpc();

How can I resolve model binding in jsonRPC microservices?

Recep Duman
  • 336
  • 4
  • 11

1 Answers1

1

I solved this problem in configuration

public void ConfigureServices(IServiceCollection services)
{
            services.AddJsonRpc(opt =>
            {
                opt.JsonSerializerSettings = new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
            });
}
Recep Duman
  • 336
  • 4
  • 11