-Fixed casting dynamic base64 string to byte array
-Fixed formatting override on SerializeObject methods -Added support for deserializing nested DataTables and arrays in DataTables
This commit is contained in:
@@ -1850,6 +1850,27 @@ keyword such as type of business.""
|
||||
Assert.AreEqual("[3,2,1]", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FormattingOverride()
|
||||
{
|
||||
var obj = new { Formatting = "test" };
|
||||
|
||||
JsonSerializerSettings settings = new JsonSerializerSettings { Formatting = Formatting.Indented };
|
||||
string indented = JsonConvert.SerializeObject(obj, settings);
|
||||
|
||||
string none = JsonConvert.SerializeObject(obj, Formatting.None, settings);
|
||||
Assert.AreNotEqual(indented, none);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DateTimeTimeZone()
|
||||
{
|
||||
var date = new DateTime(2001, 4, 4, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
string json = JsonConvert.SerializeObject(date);
|
||||
Assert.AreEqual(@"""2001-04-04T00:00:00Z""", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GuidTest()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user