Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created July 4, 2017 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/8a05113efa18cb98f2581a6ec6ea8cb0 to your computer and use it in GitHub Desktop.
Save dcomartin/8a05113efa18cb98f2581a6ec6ea8cb0 to your computer and use it in GitHub Desktop.
public class PascalCaseJsonProfileFormatter : JsonOutputFormatter
{
public PascalCaseJsonProfileFormatter() : base(new JsonSerializerSettings { ContractResolver = new DefaultContractResolver() }, ArrayPool<char>.Shared)
{
SupportedMediaTypes.Clear();
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/json;profile=\"https://en.wikipedia.org/wiki/PascalCase\""));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment