json – Swift The data couldn’t be read because it isn’t in the correct format

I am new to swift and trying to figure out how to parse JSON to a struct. I am trying to get an image from NASA Mar’s Rover Photos.I am trying to follow tutorials online, but can’t seem to fix this issue. What am I doing wrong here?

error:

Fatal error: The data couldn’t be read because it isn’t in the correct format.

import Foundation

class API {
    class func getImage(_ onSucessus: @escaping ((LatestPhoto)) -> ()){
        Constrant.session.dataTask(with: Constrant.request){(data, res, err) in
            guard let data = data, err == nil else{
                fatalError()
            }
            do{
                let apod = try Constrant.decoder.decode((LatestPhoto).self, from: data)
                DispatchQueue.main.async {
                    onSucessus(apod)
                }
            }
            catch{
                fatalError(error.localizedDescription)
            }
            
        }.resume()
        
    }
}

Struct

struct LatestPhoto: Identifiable, Codable{
    let id = UUID()
    let imgSrc: String
    let earthDate: String

    enum CodingKeys: String, CodingKey {
        case imgSrc = "http://stackoverflow.com/img_src"
        case earthDate = "earth_date"
      
    }
}

JSON

{
  "latest_photos": (
    {
      "id": 839114,
      "sol": 3127,
      "camera": {
        "id": 20,
        "name": "FHAZ",
        "rover_id": 5,
        "full_name": "Front Hazard Avoidance Camera"
      },
      "http://stackoverflow.com/img_src": "https://mars.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/03127/opgs/edr/fcam/FRB_675093431EDR_F0880366FHAZ00302M_.JPG",
      "earth_date": "2021-05-23",
      "rover": {
        "id": 5,
        "name": "Curiosity",
        "landing_date": "2012-08-06",
        "launch_date": "2011-11-26",
        "status": "active"
      }
    },
    {
      "id": 839115,
      "sol": 3127,
      "camera": {
        "id": 20,
        "name": "FHAZ",
        "rover_id": 5,
        "full_name": "Front Hazard Avoidance Camera"
      },
      "http://stackoverflow.com/img_src": "https://mars.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/03127/opgs/edr/fcam/FLB_675093431EDR_F0880366FHAZ00302M_.JPG",
      "earth_date": "2021-05-23",
      "rover": {
        "id": 5,
        "name": "Curiosity",
        "landing_date": "2012-08-06",
        "launch_date": "2011-11-26",
        "status": "active"
      }
    }
  )
}