Commit b5d4ed23 authored by Eyad Hasan's avatar Eyad Hasan
Browse files

Mapping the JSON out

Added code to parse the json in a more direct manner, breaking it up based on the objects we are givin.  Work will need to be done to store things like locations/names, aka when we start working on raelm
parent ac42e2ff
......@@ -27,23 +27,26 @@ class SRCTNetworkController: NSObject {
if (statusCode == 200) {
if let dataN = data {
let json = try? JSONSerialization.jsonObject(with: dataN, options: [])
if let schedule = json as? [String: Any]{
if let Array: currentSchedule = schedule["main_schedule"] as? Array {
}
}
}
}
print(facilities)
completion(facilities)
}
}
}
print(Facility.MainSchedule.self)
task.resume()
}
}
print(Facility.MainSchedule.self)
task.resume()
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment