comment analyser la réponse de savon dans JSON Tableau chaîne de réponse de savon: -comment analyser la réponse du savon tableau JSON dans iOS
NSString * string = @ "http://schemas.xmlsoap.org/soap/envelope/\ "xmlns: xsi = \" http: //www.w3.org/2001/XMLSchema-instance \ "xmlns: xsd = \" http: //www.w3.org/2001/XMLSchema \ "> http: //tempuri.org/\ "> [{\" rest_id \ ": 1, \" nom_réception \ ": \" cantine 21 \ ", \" adresse_restante \ ": \" janakpuri \ ", \" clientid \ ": 1, \ "rest_lat \": \ "28,619713 \", \ "rest_long \": \ "77,088404}]";
NSData *webData = [string dataUsingEncoding:NSASCIIStringEncoding];
NSError *e = nil;
NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData: webData options: NSJSONReadingAllowFragments error: &e];
Avec un analyseur JSON, dont il existe plusieurs. Sauf que ce qui précède n'est pas tout à fait légal JSON. Le seul JSON légal est la partie après 'tempuri.org ^>'. –
Wasap le point de SOAP pour ne pas avoir à s'inquiéter de la sérialisation des valeurs transportées? Peut-être que vous souhaitez utiliser autre chose pour votre application. – ToBe
Tout analyseur JSON – Rakesh