title: Type Mismatch error parsing JSON with Swift Decodable
body: <p>When I try to decode JSON I get the error:</p>
  
  <blockquote>
    <p>(Error:  typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [sweetyanime.Video.(CodingKeys in _D1045E05CDE474AEBA8BDCAF57455DC3).video, sweetyanime.iD.(CodingKeys in _D1045E05CDE474AEBA8BDCAF57455DC3).ID, sweetyanime.other.(CodingKeys in _D1045E05CDE474AEBA8BDCAF57455DC3).CountOfVideos], debugDescription: "Expected to decode String but found a dictionary instead.", underlyingError: nil)</p>
  </blockquote>
  
  <p>1) JSON:</p>
  
  <pre><code>{ "video":{  
  
    "ID":{ 
  
       "Name":"NameOfAnime",
       "Describe":"SomeDescribe",
       "Image":"https://firebasestorage.googleapis.com/v0/b/sweety-anime-e6bb4.appspot.com/o/main.png?alt=media&amp;token=042a2dad-8519-4904-9ba3-262c2c962434",
       "CountOfVideos":{  
          "1Series":"https://firebasestorage.googleapis.com/v0/b/sweety-anime-e6bb4.appspot.com/o/message_movies%252F12323439-9729-4941-BA07-2BAE970967C7.movalt=media&amp;token=978d8b3a-7aad-468f-87d4-2b587d616720"
       }
    } } }
  </code></pre>
  
  <p>2) Swift code:</p>
  
  <pre><code>let jsonUrl = "file:///Users/tima/WebstormProjects/untitled/db.json"
  guard let url = URL(string: jsonUrl) else { return }
  
  URLSession.shared.dataTask(with: url) { (data, reponse, error) in
      guard let data = data else {return}
      do {
          let video = try
              JSONDecoder().decode(Video.self, from: data)
          print(video.video.ID.Name)
      } catch let jsonErr {
          print("Error: ", jsonErr)
      }
  }.resume()
  </code></pre>
  
  <p>3) Video.swift</p>
  
  <pre><code>struct Video: Decodable {
     private enum CodingKeys : String, CodingKey { case video = "video" 
     }
     let video: iD
  }
  
  struct iD: Decodable {
     private enum CodingKeys : String, CodingKey { case ID = "ID" }
     let ID: other
  }
  
  struct other: Decodable {
     private enum CodingKeys : String, CodingKey {
        case Name = "Name"
        case Describe = "Describe"
        case Image = "Image"
        case CountOfVideos = "CountOfVideos"
     }
     let Name: String
     let Describe: String
     let Image: String
     let CountOfVideos: String
  }
  </code></pre>