このリンクhttp://dir.yummly.com/4/public/8a753a70358c827b01358da787bd68f3からjsonを使用できるWindowsPhoneアプリを作成していますが、データを非同期でダウンロードしようとすると、e.resultを読み取り可能にすることができません。言語。これが私のc#コードです-
Uri sub4 = new Uri("http://dir.yummly.com/4/public/8a753a70358c827b01358da787bd68f3");
string kit = sub4.ToString();
WebClient w = new WebClient();
w.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
w.DownloadStringAsync(sub4);
MessageBox.Show("done");
}
void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
string fres = e.Result;// here e.result was �
}
そして、e.resultを逆シリアル化したい。私のコードは他のjsonURLに対して正しく機能しています。また、Windows Phoneアプリで作業しているため、DownloadDataやDownloadStringなどの他のWebcilentメソッドを使用できません。また、utf8とunicodeの間で多くの変換を見てきましたが、どれも機能しませんでした。誰か助けてもらえますか?