Skip to content

Instantly share code, notes, and snippets.

@bojanrajkovic
Created May 16, 2015 13:38
Show Gist options
  • Save bojanrajkovic/4ea54b8049e418b6a249 to your computer and use it in GitHub Desktop.
Save bojanrajkovic/4ea54b8049e418b6a249 to your computer and use it in GitHub Desktop.
services.Configure<MvcOptions>(options => {
var jsonFormatters = options.OutputFormatters.OfType<JsonOutputFormatter>();
foreach (var formatter in jsonFormatters) {
// Camel-case by default \o/
formatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
}
});
Copy link

ghost commented May 24, 2015

hi @bokanrajkovic,

above code for the MVC 6 Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment