1
Ich habe Probleme in meinen Codes, wenn ich versuche, JSON - Daten zu parsen (jede Daten eines Arrays, wie es gemacht werden soll) und versuche, die Für die In-Schleife kommt der Fehler heraus. Hier ist mein CodeTyp 'Any' entspricht nicht dem Protokoll 'Sequence'
if let jsonDataArray = try? JSONSerialization.jsonObject(with: data!, options: [])
{
print(jsonDataArray)
var allStops = [busStops]()
for eachData in jsonDataArray
^
//this is where the error is located
{
if let jsonDataDictionary = eachData as? [String : AnyObject]
{
let eachStop = busStops(jsonDataDictiony: jsonDataDictionary)
}
}
}