I know how to do this but what I don't know is how I handle JSON like this:
[{
"player": {
"id": 1,
"name": "Name",
"contact": {
"tel": "123456789",
"nick_name": "NickName"
},
"achievments": {
"achievment1": "Achievment",
"achievment2": "Achievment"
}
}
}]
"contact" and "achievments" have subinfo. How do I handle this?
XDocument xmlDocument = new XDocument(new XDeclaration("1.0", "utf-8", "yes"),
new XElement("Players", from player in PlayerList
select new XElement("player",
new XElement("id", player.Id),
new XElement("name", player.Name))));