Closed herariom closed 5 years ago
Thanks for the issue!
I think this works correctly. <friends />
is a self closing element. Same as it would be <friends></friends>
.
Child in family 1 has an empty array in friends (also family 0 has an empty array in children). XML serializer will just create an empty element for empty arrays.
{
"name": "Katheryn",
"gender": "female",
"age": 9,
"friends": []
}
If you think this should work differently, just reopen this issue.
When using the command "curl -H "Accept: text/xml" http://localhost:57602/api/families/1", it appears that an errant \<friends />" tag (not \</friends>) appears right before a \</child> tag.
For the command "curl -H "Accept: text/xml" http://localhost:57602/api/families/0", an errant \<children /> tag occurs after \</parents>
I did some testing and was able to replicate this problem before the changes in XML pluralization, but I wasn't able to find an immediate cause.