Skip to content

Instantly share code, notes, and snippets.

@osmyn
Created August 30, 2017 21:08
Show Gist options
  • Save osmyn/d3a2d1984ec538691779ebf04a987b2e to your computer and use it in GitHub Desktop.
Save osmyn/d3a2d1984ec538691779ebf04a987b2e to your computer and use it in GitHub Desktop.
JsonCamelCaseFormatter
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
var formatters = GlobalConfiguration.Configuration.Formatters;
var jsonFormatter = formatters.JsonFormatter;
var settings = jsonFormatter.SerializerSettings;
settings.Formatting = Formatting.Indented;
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment