Quick question about serialization in .NET (still pretty new to it).
I have a route that returns Dictionary<string, ArbirartyModel[]>
. The issue is in the result. I've put expected and actual below. It seems to lower all characters up until 1 character before the first underscore, then leaves everything else below.
Expected
{
TEST_ONE: "Value",
TEST_TOW: "Value"
}
Actual
{
tesT_ONE: "Value",
tesT_TOW: "Value"
}
I've been looking around and it seems that this issue and a few others are related, but, unfortunately, I cannot change anything in the Global.asax
Any help would be very much appreciated.
Update
[HttpGet, Route("result/goes/here")]
public IHttpActionResult ReturnResult()
{
return Ok(new Dictionary<string, string>() {{"TEST_ONE", "Value"}, {"TEST_TOW", "Value"}});
}
Ok
is part of IHttpActionResult in Web API (https://msdn.microsoft.com/en-us/library/dn314591.aspx)