title: typeMismatch(Swift.Dictionary<Swift.String, Any>,
body: <p>my JSON :</p>
  <pre><code>'''
  {
    &quot;status&quot;: 200,
    &quot;data&quot;: {
      &quot;widgets&quot;: [
        {
          &quot;type&quot;: &quot;small_half_slider&quot;,
          &quot;data&quot;: {
            &quot;banners&quot;: [
              {
                &quot;id&quot;: 42765,
                &quot;image&quot;: &quot;&quot;,
                &quot;title&quot;: &quot;!&quot;,
                &quot;is_ad&quot;: false,
                &quot;url&quot;: {
                  &quot;url&quot;: &quot;&quot;,
                  &quot;page&quot;: &quot;web_link&quot;,
                  &quot;params&quot;: {
                    &quot;url&quot;: &quot;&quot;
                  },
                  &quot;queries&quot;: []
                },
                &quot;video&quot;: &quot;&quot;,
                &quot;description&quot;: &quot;&quot;,
                &quot;bullet_points&quot;: []
              }
  '''
  </code></pre>
  <p>and my Struct:</p>
  <pre><code>'''
  import Foundation
  
  struct mainPage:Codable{
    var  status:Int?
    var  data: mData?
  }
  
  struct mData:Codable {
      var widgets:[Mwidg]
  }
  
  struct Mwidg:Codable{
  
      var type:String
      var data:wdata
  }
  
  struct wdata:Codable{
     var show_type:String?
     var banners:[bannerData]?
  }
  
  struct bannerData:Codable {
      var id:Int?
      var image:String?
      var title:String?
      var is_ad:Bool?
      var url:urlData?
      var video:String?
      var description:String?
  
  }
  struct urlData:Codable {
      var url:String?
      var page:String?
      var params:paramsData?
      var queries:[queriesData]?
  }  
  
  struct paramsData:Codable {
      var url:String?
  }
  
  struct queriesData:Codable {
  
   }
  
  
  '''
  </code></pre>
  <p>then i faced to this error:</p>
  <p>typeMismatch(Swift.Dictionary&lt;Swift.String, Any&gt;, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: &quot;data&quot;, intValue: nil), CodingKeys(stringValue: &quot;widgets&quot;, intValue: nil), _JSONKey(stringValue: &quot;Index 1&quot;, intValue: 1), CodingKeys(stringValue: &quot;data&quot;, intValue: nil)], debugDescription: &quot;Expected to decode Dictionary&lt;String, Any&gt; but found an array instead.&quot;, underlyingError: nil))</p>