1
ここ
は、私はこのコードを実行すると、私はポストのようなデータを取得し、私のデータswift3 Alamofire XMLデータ
ここ
Data: <?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://192.168.80.41:8081/WebServiceTest.asmx">[
{
"NonCID": "n10909",
"Name": "aaaa",
"ClassType": "aa",
"City": "aaa",
"Area": "aaa",
"Address": "aaaa",
"TelArea": "02",
"Tel": "29857456",
"Latitude": 25.062047000000000,
"Longitude": 121.495241000000000
},
{
"NonCID": "n10957",
"Name": "xxxx",
"ClassType": "xx",
"City": "xxx",
"Area": "xxx",
"Address": "xxxxx",
"TelArea": "02",
"Tel": "29736693",
"Latitude": 25.061227100000000,
"Longitude": 121.495149900000000
},
{
"NonCID": "n10958",
"Name": "xxxx",
"ClassType": "xx",
"City": "xxx",
"Area": "xxx",
"Address": "xxxx",
"TelArea": "02",
"Tel": "29821024",
"Latitude": 25.061812900000000,
"Longitude": 121.495274000000000
}]</string>
は私のコード
Alamofire.request("http://localhost/WebServiceTest.asmx/") .responseData { response in
debugPrint("All Response Info: \(response)")
if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8) {
print("Data: \(utf8Text)")
}
}
ですデータフォーム[{"noncid": "xxxx"、 "Name": "bbb"、........ etc}]を辞書に入れることはできません。
誰も私が使用できる辞書にデータを取得する方法を知っていますか? または別の方法でそれを行うことができます。すべての歓声に感謝
それは仕事です!ありがとうたくさんの歓声 – Jeff