1 pièce(s) jointe(s)
Problème de deserialisation json
Bonjour,
Je souhaites récupérer les attributs d'un fichier json.
J'ai commencé par ca:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| private void button1_Click(object sender, RoutedEventArgs e)
{
string jsonurl = @"file.json";
WebClient downloader = new WebClient();
downloader.OpenReadCompleted += new OpenReadCompletedEventHandler(downloader_OpenReadCompleted);
downloader.OpenReadAsync(serviceUri);
}
void downloader_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
if (e.Result!=null)
{ |
Eh là je suis un peu perdu...
J'ai essayé plusieurs choses mais ca ne marche pas.
Code:
1 2
| DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(string ));
ser.ReadObject(e.Result); |
J'ai une erreur :
Citation:
Invalid escape code encountered in a JSON string. (358291):
Voir pièce jointe
Merci de m'aider.