title: Swift.DecodingError.Context(codingPath:
body: <p>i am decoding JSON (Decoder) string from URL repsonse as follows and get a get during the decoding process the following error messages: </p>
  
  <p>Error Message: </p>
  
  <pre><code>typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "values", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "stat-list", intValue: nil), CodingKeys(stringValue: "stat", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "timestamps", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "Expected to decode String but found a number instead.", underlyingError: nil))
  </code></pre>
  
  <p>Here is my JSON String from response: </p>
  
  <pre><code>{"values":[{"resourceId":"AAAAAA-3398-4280-8e32-BBBBBBBB","stat-list":{"stat":[{"timestamps":[1534186909854],"statKey":{"key":"cpu|underusedpercent"},"data":[25.0]},{"timestamps":[1538430850296],"statKey":{"key":"mem|consumedPct"},"data":[99.9984130859375]}]}}]}
  </code></pre>
  
  <p>My suitable struct : </p>
  
  <pre><code>struct VrOpsObjectCpuRAMStatistics: Decodable
  {
      struct Values: Decodable
      {
          let resourceId: String
          struct StatList: Decodable
          {
              struct Stat: Decodable
              {
                  let timestamps: [String] 
                  struct StatKey: Decodable
                  {
                      let key: String
                  }
                  let statKey: StatKey
                  let data: [String] 
              }
              let stat: [Stat]
          }
          let statList: StatList
          private enum CodingKeys: String, CodingKey
          {
              case resourceId
              case statList = "stat-list"
          }
      }
      let values: [Values]
  }
  </code></pre>
  
  <p>My decoding call with JSON decoder:</p>
  
  <pre><code> self.vrOpsObjectCpuRamStatistics = try JSONDecoder().decode(VrOpsObjectCpuRAMStatistics.self , from: jsonData)
                      if self.vrOpsObjectCpuRamStatistics != nil
                      {
                          print("Data from REST call has been converted sucessfully to JSON Object" );
                          return (true, self.vrOpsObjectCpuRamStatistics);
                      }
                      else
                      {
                          return (false, "Decoding vRops data to JSON object has been failed!");
                      }
  </code></pre>