json serialize object capitalization config code example
Example: json serialize object capitalization config
protected void Application_Start() {
JsonConfig.Configure();
}
public static class JsonConfig
{
public static void Configure(){
var formatters = GlobalConfiguration.Configuration.Formatters;
var jsonFormatter = formatters.JsonFormatter;
var settings = jsonFormatter.SerializerSettings;
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
}
}