Skip to content

Commit 7868b2b

Browse files
committed
Preserve parent namespace when serializing lists
1 parent d5e437a commit 7868b2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RestSharp/Serializers/XmlSerializer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public string Serialize(object obj) {
7777
{
7878
itemTypeName = type.Name;
7979
}
80-
var instance = new XElement(itemTypeName);
80+
var instance = new XElement(itemTypeName.AsNamespaced(Namespace));
8181
Map(instance, item);
8282
root.Add(instance);
8383
}
@@ -155,7 +155,7 @@ where p.CanRead && p.CanWrite
155155
? setting.Name
156156
: type.Name;
157157
}
158-
var instance = new XElement(itemTypeName);
158+
var instance = new XElement(itemTypeName.AsNamespaced(Namespace));
159159
Map(instance, item);
160160
element.Add(instance);
161161
}

0 commit comments

Comments
 (0)