title: Swift 2 .plist dictArray to Remote Json Array Error
body: <p>I have working tableview and detail view project. But it based local .plist array system i want to change it to remote .json array system i try somethings but gives errors. I need your help expert ! working code under. Ty.</p>
  
  <pre><code>import Foundation
  import MapKit
  
  struct VacationSpot {
    let identifier: Int
    let name: String
    let locationName: String
    let thumbnailName: String
    let whyVisit: String
    let whatToSee: String
    let weatherInfo: String
    let userRating: Int
    let wikipediaURL: NSURL
    let coordinate: CLLocationCoordinate2D
  }
  
  // MARK: - Support for loading data from plist
  
  extension VacationSpot {
  
    static func loadAllVacationSpots() -&gt; [VacationSpot] {
      return loadVacationSpotsFromPlistNamed("vacation_spots")
    }
  
    private static func loadVacationSpotsFromPlistNamed(plistName: String) -&gt; [VacationSpot] {
      guard
        let path = NSBundle.mainBundle().pathForResource(plistName, ofType: "plist"),
        let dictArray = NSArray(contentsOfFile: path) as? [[String : AnyObject]]
        else {
          fatalError("An error occurred while reading \(plistName).plist")
      }
  
  
  
  
      var vacationSpots = [VacationSpot]()
  
      for dict in dictArray {
        guard
          let identifier    = dict["identifier"]    as? Int,
          let name          = dict["name"]          as? String,
          let locationName  = dict["locationName"]  as? String,
          let thumbnailName = dict["thumbnailName"] as? String,
          let whyVisit      = dict["whyVisit"]      as? String,
          let whatToSee     = dict["whatToSee"]     as? String,
          let weatherInfo   = dict["weatherInfo"]   as? String,
          let userRating    = dict["userRating"]    as? Int,
          let wikipediaLink = dict["wikipediaLink"] as? String,
          let latitude      = dict["latitude"]      as? Double,
          let longitude     = dict["longitude"]     as? Double
          else {
            fatalError("Error parsing dict \(dict)")
        }
  
        let wikipediaURL = NSURL(string: wikipediaLink)!
        let coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
        let vacationSpot = VacationSpot(
          identifier: identifier,
          name: name,
          locationName: locationName,
          thumbnailName: thumbnailName,
          whyVisit: whyVisit,
          whatToSee: whatToSee,
          weatherInfo: weatherInfo,
          userRating: userRating,
          wikipediaURL: wikipediaURL,
          coordinate: coordinate
        )
  
        vacationSpots.append(vacationSpot)
      }
  
      return vacationSpots
    }
  }
  </code></pre>