Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebAPiConfig.cs add JsonConverer
using System.Web.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Viola.CallSlipFetching;
using ViolaGui.Filters;
namespace ViolaGui
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
/* Other stuff goes here*/
var formatters = GlobalConfiguration.Configuration.Formatters;
var jsonFormatter = formatters.JsonFormatter;
var settings = jsonFormatter.SerializerSettings;
settings.Converters.Add(new CallSlipDeliveryTypeConverter());
settings.Formatting = Formatting.Indented;
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
/* Other stuff goes also here*/
}
}
}
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.