Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
JSON Camelcase properties
// Add framework services.
services.AddMvc(options =>
var json = options.OutputFormatters
if (json != null)
json.SerializerSettings.ContractResolver =
new CamelCasePropertyNamesContractResolver();

This comment has been minimized.

Copy link

khellang commented Mar 14, 2016

There's also a slightly easier way:

    .AddJsonOptions(options =>
            .ContractResolver = new CamelCasePropertyNamesContractResolver());


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.