Skip to content

Instantly share code, notes, and snippets.

@airyboy
Created September 6, 2017 12:16
Show Gist options
  • Save airyboy/707ec1c92f78116d141ecc78fcc30857 to your computer and use it in GitHub Desktop.
Save airyboy/707ec1c92f78116d141ecc78fcc30857 to your computer and use it in GitHub Desktop.
Newtonsoft.Json, transform names to camelCase through Contract Resolver option
JsonConvert.SerializeObject(
<YOUR OBJECT>,
new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment