-Fixed potential race condition serializing F# objects

-Fixed schema divisible sometimes incorrectly validating to false
-Fixed not calling virtual ShouldSerialize methods
This commit is contained in:
James Newton-King
2014-03-31 15:47:36 +13:00
parent de5f7dd8a8
commit 6965fcfa46
63 changed files with 4992 additions and 3302 deletions
@@ -115,6 +115,22 @@ namespace Newtonsoft.Json.Tests.Converters
}
#if !NET20
[Test]
public void GroupElementsOfTheSameName()
{
string xml = "<root><p>Text1<span>Span1</span> <span>Span2</span> Text2</p></root>";
string json = JsonConvert.SerializeXNode(XElement.Parse(xml));
Assert.AreEqual(@"{""root"":{""p"":{""#text"":[""Text1"","" Text2""],""span"":[""Span1"",""Span2""]}}}", json);
XDocument doc = JsonConvert.DeserializeXNode(json);
Assert.AreEqual(@"<root>
<p>Text1 Text2<span>Span1</span><span>Span2</span></p>
</root>", doc.ToString());
}
[Test]
public void SerializeEmptyDocument()
{