title: Can't return or decode data with JSONDecoder
body: <p>I am learning to decode data with JSON in an Xcode playground but can't figure out what's wrong with my code, I can't return data nor decode it . 
  Here is my code:</p>
  
  <pre><code>import UIKit
  import PlaygroundSupport
  
  PlaygroundPage.current.needsIndefiniteExecution = true
  
  extension URL {
      func withQueries(_ queries: [String: String]) -&gt; URL? {
          var components = URLComponents(url: self, resolvingAgainstBaseURL: true)
          components?.queryItems = queries.flatMap { URLQueryItem(name: $0.0, value: $0.1) }
          return components?.url
      }
  }
  
  struct StoreItems: Codable {
      let results: [StoreItem]
  }
  
  struct StoreItem: Codable {
      var name: String
      var artist: String
      var kind: String
      var artworkURL: URL
      var description: String
  
      enum CodingKeys: String, CodingKey {
          case name = "trackName"
          case artist = "artistName"
          case kind
          case artworkURL
          case description
      }
  
      enum AdditionalKeys: String, CodingKey {
          case longDescription
      }
  
      init(from decoder: Decoder) throws {
          let valueContainer = try decoder.container(keyedBy: CodingKeys.self)
          name = try valueContainer.decode(String.self, forKey: CodingKeys.name)
          artist = try valueContainer.decode(String.self, forKey: CodingKeys.artist)
          kind = try valueContainer.decode(String.self, forKey: CodingKeys.kind)
          artworkURL = try valueContainer.decode(URL.self, forKey: CodingKeys.artworkURL)
  
          if let description = try? valueContainer.decode(String.self, forKey: CodingKeys.description) {
              self.description = description
          } else {
              let additionalValues = try decoder.container(keyedBy: AdditionalKeys.self)
              description = (try? additionalValues.decode(String.self, forKey: AdditionalKeys.longDescription)) ?? ""
          }
      }
  }
  
  func fetchItems(matching query: [String: String], completion: @escaping ([StoreItem]?) -&gt; Void) {
  
      let baseURL = URL(string: "https://www.itunes.apple.com/search?")!
  
      guard let url = baseURL.withQueries(query) else {
          completion(nil)
          print("Unable to build URL with supplied queries.")
          return
      }
  
      let task = URLSession.shared.dataTask(with: url) { (data, response, error) in
          let decoder = JSONDecoder()
          if let data = data,
              let storeItems = try? decoder.decode(StoreItems.self, from: data) {
              completion(storeItems.results)
          } else {
              print("Either no data was returned or data was not properly decoded.")
              completion(nil)
              return
          }
      }
      task.resume()
  }
  
  let query: [String: String] = [
      "term": "Inside Out 2015",
      "media": "movie",
      "lang": "en_us",
      "limit": "10"
  ]
  
  fetchItems(matching: query) { (items) in
      print(items)
  }
  </code></pre>
  
  <p>And here is what's printed to the console which I guess shows that something is wrong with my "task":</p>
  
  <p>Either no data was returned or data was not properly decoded.</p>
  
  <p>nil</p>