XML応答からJSONデータを取得したい。実際にWebサービスが応答を返すのは次のとおりです。
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
[
{
"id": 1,
"name": "paresh",
},
{
"id": 2,
"name": "jacob",
},
{
"id": 3,
"name": "color",
},
{
"id": 4,
"name": "Adil color",
}
]</string>
私はすでにいくつかの記事を参照しました。そして、応答がXMLのみの場合、次のように実装できます。
MyListBox.ItemsSource = from tweet in xmlTweets.Descendants("student")
select new StudentItem
{
ID = tweet.Element("id").Value,
Name = tweet.Element("name").Value,
};
しかし、ここでの私の問題は、内部にあるJSONを取得し、ListBoxに表示することです。