JSON Data corrupted error

When I try to decode JSON it gives me the dataCorrupted error with debugDescription: "The given data was not valid JSON."

Model:

import Foundation

struct Test: Codable {
  var data: [Coordinate]
}

struct Coordinate: Codable {
  let id: Int
  let latit: Double
  let longit: Double
}

JSON:

Request code:

func requestSpots() async {

    let url = URL(string: "http://37.143.66.25:9875/spots/get-all")!
    var request = URLRequest(url: url)
    request.setValue("x-access-token", forHTTPHeaderField: token)
    request.httpMethod = "GET"
     
    do {
      let (data, _) = try await URLSession.shared.data(for: request)
      do {
        let decodedSpot = try JSONDecoder().decode(Test.self, from: data)
        print(decodedSpot)
         
      } catch {
        print(String(describing: error))
      }
    } catch {
      print("Request spots failed")
    }
  }```

When you post a question, please post as text, not only image…

What are exactly your JSON data ?

Data to use should be without I/okhttp.OkHttpclient

{"data": [
    {"id":7,"latit":58.379091,"longit":26.70605459552388},
    {"id":8,"latit":58.37149,"longit":26.7119},
    {"id":9,"latit":58.37807,"longit":26.72836},
    {"id":10,"latit":59.42479,"longit":24.79517},
    {"id":11,"latit":59.43338,"longit":24.7515},
    {"id":12,"latit":58.35785,"longit":26.67737}
]
}
JSON Data corrupted error
 
 
Q