Closed Paulskit closed 3 years ago
I was able to reproduce the issue with that custom resolver, but no issue when using the built-in Newtonsoft resolver:
app.UseDotNetify(cfg => cfg.UseJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings
{
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
}));
Closing this as resolved by using the above code.
Hello @dsuryd! Thank you for the library, it saves me a lot of time. Recently I noticed a strange behavior on the serialization.
I have a custom contract resolver:
It's registered in
Startup.cs
Then there is a model (simplified for sake of readability)
When the model is created and data is loaded in
OnCreatedAsync
I get nice camelCased properties in the response. However, afterUpdate()
it seems to return PascalCased properties instead.Can you please take a look? Thank you. Appreciate your effort.