How can I configure serialization of my Web API to use camelCase
(starting from lowercase letter) property names instead of PascalCase
like it is i
For MVC 6.0.0-rc1-final
Edit Startup.cs, In the ConfigureServices(IserviceCollection)
, modify services.AddMvc();
services.AddMvc(options =>
{
var formatter = new JsonOutputFormatter
{
SerializerSettings = {ContractResolver = new CamelCasePropertyNamesContractResolver()}
};
options.OutputFormatters.Insert(0, formatter);
});