I have the following serialized json object:
\"{\\\"LineItems\\\":[{\\\"LineID\\\":1,\\\"QuoteID\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"Quantit
Try specifying the DateTime
format specifically using an IsoDateTimeConverter
, and pass it into the JsonConvert.DeserializeObject<>()
method.
...
var json = Request.RequestContext.HttpContext.Request.Params["EoiDraftModel"];
var format = "dd/MM/yyyy"; // your datetime format
var dateTimeConverter = new IsoDateTimeConverter { DateTimeFormat = format };
var ld = JsonConvert.DeserializeObject<EoiDraftViewModel>(json, dateTimeConverter);
...