-Fix occasional error when converting non-long integer properties to XML
-Fix boolean values sometimes being capitalized when converting to XML -Fix error when deserializing ConcurrentDictionary -Fix serializing some Uris -Change KeyValurPairConverter to not rely on the order of the key and value properties
This commit is contained in:
@@ -436,5 +436,17 @@ Parameter name: index")]
|
||||
{
|
||||
JArray.Parse("[1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InsertAddEnd()
|
||||
{
|
||||
JArray array = new JArray();
|
||||
array.Insert(0, 123);
|
||||
array.Insert(1, 456);
|
||||
|
||||
Assert.AreEqual(2, array.Count);
|
||||
Assert.AreEqual(123, (int)array[0]);
|
||||
Assert.AreEqual(456, (int)array[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +209,9 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[Test]
|
||||
public void Casting()
|
||||
{
|
||||
Assert.AreEqual(1L, (long)(new JValue(1)));
|
||||
Assert.AreEqual(2L, (long) new JArray(1, 2, 3)[1]);
|
||||
|
||||
Assert.AreEqual(new DateTime(2000, 12, 20), (DateTime)new JValue(new DateTime(2000, 12, 20)));
|
||||
#if !PocketPC && !NET20
|
||||
Assert.AreEqual(new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero), (DateTimeOffset)new JValue(new DateTimeOffset(2000, 12, 20, 23, 50, 10, TimeSpan.Zero)));
|
||||
|
||||
Reference in New Issue
Block a user