I am having problems with Jars.NET Parser. According to the documentation , just using ToString()without special converters, you should leave Json unchanged.
The string My Json, however, changes, and its date is automatically localized, and this causes all kinds of problems for me. For example, when I pass it the following line:
{
"_type": "Basic",
"id": "44902a0f-7842-3a2d-83bf-a874ce0b47a1",
"description": "TestBasicDescription",
"participation": 1.000000000000000,
"inception_date": "2014-02-06T20:34:00.925000+00:00",
"expiry_date": "0001-01-01T00:00:00+00:00"
}
I expect the code
Newtonsoft.Json.Linq.JObject.Parse(content).ToString(Formatting.None);
to create a string that is almost identical. However, I get the following:
{
"_type": "Basic",
"id": "44902a0f-7842-3a2d-83bf-a874ce0b47a1",
"description": "TestBasicDescription",
"participation": 1.0,
"inception_date": "2014-02-06T16:34:00.925-04:00",
"expiry_date": "0001-01-01T20:00:00-04:00"
}
As you can see, my dates have been localized.
, , (, DateTime.MinValue, ) . , , , , DateTime.MinValue 1 : UTC ( ) "0001-01-02T00:00:00+00:00". .
Json.Net , ? Json, ToString() , ?