       }
     }
     
-    done(json,nil)
-
-  }
-}
+    
+    
+    done(json as? [String:Any],nil)
+
+  }
+}

}

public enum PlaceType: CustomStringConvertible {
  case All
  case Geocode
  case Address
  case Establishment
  case Regions
  case Cities

  public var description : String {
    switch self {
      case .All: return ""
      case .Geocode: return "geocode"
      case .Address: return "address"
      case .Establishment: return "establishment"
      case .Regions: return "(regions)"
      case .Cities: return "(cities)"
    }
  }
}

public class Place: NSObject {
  public let id: String
  public let desc: String
  public var apiKey: String?

  override public var description: String {
    get { return desc }
  }


      return
    }

    let httpResponse = response as! HTTPURLResponse
    
    
    if httpResponse.statusCode != 200 {
      print("GooglePlaces Error: Invalid status code \(httpResponse.statusCode) from API")
      let error = NSError(domain: ErrorDomain, code: httpResponse.statusCode, userInfo: [NSLocalizedDescriptionKey:"Invalid status code"])
      done(nil,error)
      return
    }
    
    let json: NSDictionary?
    do {
      json = try JSONSerialization.jsonObject(
        with: data!,
        options: JSONSerialization.ReadingOptions.mutableContainers) as? NSDictionary
    } catch {
      print("Serialisation error")
      let serialisationError = NSError(domain: ErrorDomain, code: 1002, userInfo: [NSLocalizedDescriptionKey:"Serialization error"])
