-
-
Save justinyoo/4ff5e319b6d33969813d to your computer and use it in GitHub Desktop.
ASP.NET Core Tips & Tricks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = new HttpConfiguration(); | |
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); | |
config.Formatters.JsonFormatter.SerializerSettings.Converters.Add(new StringEnumConverter()); | |
config.Formatters.JsonFormatter.SerializerSettings.Formatting = Formatting.Indented; | |
config.Formatters.JsonFormatter.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; | |
config.Formatters.JsonFormatter.SerializerSettings.MissingMemberHandling = MissingMemberHandling.Ignore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment