-Fixed bug when converting certain XML with namespaces

-Add support for serializing F# lists, sets and maps
This commit is contained in:
James Newton-King
2014-03-09 17:46:36 +13:00
parent f6c74bdf3c
commit d5b71afc88
26 changed files with 9193 additions and 70 deletions
@@ -141,6 +141,24 @@ namespace Newtonsoft.Json.Tests.Converters
json = JsonConvert.SerializeXNode(doc1, Formatting.Indented, true);
Assert.AreEqual("null", json);
}
[Test]
public void SerializeAndDeserializeXmlWithNamespaceInChildrenAndNoValueInChildren()
{
var xmlString = @"<root>
<b xmlns='http://www.example.com/ns'/>
<c>AAA</c>
<test>adad</test>
</root>";
var xml = XElement.Parse(xmlString);
var json1 = JsonConvert.SerializeXNode(xml);
var xmlBack = JsonConvert.DeserializeObject<XElement>(json1);
var equals = XElement.DeepEquals(xmlBack, xml);
Assert.IsTrue(equals);
}
#endif
[Test]