FlowUnits changed on recalibration
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
namespace Service.MeterProcessState
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
@@ -15,6 +18,19 @@
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||
|
||||
// GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.Converters.Add(new Bytes2StringConverter());
|
||||
}
|
||||
}
|
||||
|
||||
public class Bytes2StringConverter : JsonConverter<byte[]>
|
||||
{
|
||||
public override Byte[] ReadJson(JsonReader reader, Type objectType, byte[] existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, byte[] value, JsonSerializer serializer)
|
||||
=> writer.WriteValue(BitConverter.ToString(value ?? Array.Empty<byte>()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user