diff options
author | JamesNK <james@newtonking.com> | 2011-05-02 15:25:06 +0400 |
---|---|---|
committer | JamesNK <james@newtonking.com> | 2011-05-02 15:25:06 +0400 |
commit | e04432b7e7cd2284d866a8df8edc9ac6d73be6cc (patch) | |
tree | f6e74622f6e692ce409a4b00f52c8104de57c7e1 /Src/Newtonsoft.Json | |
parent | 045a1ec334421a2ac7df5db65fad68f85c297466 (diff) |
-Fixed converting emtpy XML elements with an array attribute not writing other attributes
Diffstat (limited to 'Src/Newtonsoft.Json')
-rw-r--r-- | Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs index 8c388df..bef5eb6 100644 --- a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs +++ b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs @@ -961,7 +961,7 @@ namespace Newtonsoft.Json.Converters SerializeGroupedNodes(writer, node, manager, writePropertyName);
break;
case XmlNodeType.Element:
- if (IsArray(node) && node.ChildNodes.All(n => n.LocalName == node.LocalName))
+ if (IsArray(node) && node.ChildNodes.All(n => n.LocalName == node.LocalName) && node.ChildNodes.Count > 0)
{
SerializeGroupedNodes(writer, node, manager, false);
}
|