-Fixed DefaultValueHandling.Ignore with decimal properties

-Fixed approximate floating point comparisons
This commit is contained in:
James Newton-King
2012-06-09 13:54:30 +12:00
parent 55854f1682
commit 1b972cd65f
6 changed files with 90 additions and 4 deletions
@@ -1314,6 +1314,27 @@ namespace Newtonsoft.Json.Tests.Converters
}", json);
}
[Test]
public void EmtpyElementWithArrayAttributeShouldWriteElement()
{
string xml = @"<root>
<Reports d1p1:Array=""true"" xmlns:d1p1=""http://james.newtonking.com/projects/json"" />
</root>";
XmlDocument d = new XmlDocument();
d.LoadXml(xml);
string json = JsonConvert.SerializeXmlNode(d, Formatting.Indented);
Assert.AreEqual(@"{
""root"": {
""Reports"": [
{}
]
}
}", json);
}
[Test]
public void DeserializeNonInt64IntegerValues()
{