Y is my object being serialized in a weird manner while using newtonsoft.json
from ASP.Net Web API?
var s = JsonConvert.SerializeObject(request, For
I doubt you are still seeking an answer, but my workaround was to create a JObject with Newtonsoft and pass that.
Either:
JObject jBytes = Object.Parse(JsonConvert.SerializeObject(myObject, MyDateTimeFmtString);
or
JObject jBytes = JObject.FromObject(myObject, MyJsonSerializer);
The first case was my second choice, but I think there is a bug in Newtonsoft where JObject.FromObject ignores the DateFormatString in JsonSerializer.