- let jsonResponse = try? JSONSerialization.jsonObject(with: data) as! [String: Any]
- if let jsonResponse = jsonResponse {
- if let lyricsUrlString = jsonResponse["url"] as? String {
- if let lyricsUrl = URL(string: lyricsUrlString) {
-
- // At this point we have a valid wiki url
- self.fetchLyricsFromPage(withURL: lyricsUrl, completionHandler: completionHandler)
- return
+ if let jsonResponse = try? JSONSerialization.jsonObject(with: data) {
+ if let jsonResponse = jsonResponse as? [String: Any] {
+ if let lyricsUrlString = jsonResponse["url"] as? String {
+ if let lyricsUrl = URL(string: lyricsUrlString) {
+
+ // At this point we have a valid wiki url
+ self.fetchLyricsFromPage(withURL: lyricsUrl, completionHandler: completionHandler)
+ return
+ }