-Added a special case to correctly deserialize Version class

-Changed Silverlight and Windows Phone assemblies in NuGet to be strong named
-Changed CamelCasePropertyNamesContractResolver to improve camel casing property names
-Fixed QuoteChar not being used when writing DateTimes, TimeSpans, Uris and Guids
This commit is contained in:
James Newton-King
2012-11-04 14:44:55 +13:00
parent b51b3aa20a
commit c06c7b8aae
13 changed files with 151 additions and 46 deletions
@@ -113,5 +113,18 @@ namespace Newtonsoft.Json.Tests.Converters
DeserializeVersionClass("1.2.3", "2.3.4");
DeserializeVersionClass("1.2.3.4", "2.3.4.5");
}
[Test]
public void RoundtripImplicitConverter()
{
var version = new Version(1, 0, 0, 0);
string reportJSON = JsonConvert.SerializeObject(version);
//Test
Version report2 = JsonConvert.DeserializeObject<Version>(reportJSON);
string reportJSON2 = JsonConvert.SerializeObject(report2);
Assert.AreEqual(reportJSON, reportJSON2);
}
}
}