GlobalConfiguration.Configuration.Formatters.Remove(new XmlMediaTypeFormatter());
// 解决json序列化时的循环引用问题
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling =
Newtonsoft.Json.ReferenceLoopHandling.Ignore;
// 对 JSON 数据使用混合大小写。驼峰式,但是是javascript 首字母小写形式.
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver =
new CamelCasePropertyNamesContractResolver();
//对日期格式进行统一处理
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.Converters.Add(
new IsoDateTimeConverter()
{
DateTimeFormat = "yyyy-MM-dd HH:mm:ss.fff"
});