         }
         
         do {
-            let object = try JSONDecoder().decode(T.self, from: validData)
+            let object = try decoder.decode(T.self, from: validData)
             return .success(object)
         } catch {
             return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error)))

    ///
    /// - returns: A JSON Decodable object response serializer.
    public static func JSONDecodableResponseSerializer<T: Decodable>(
        decoder: JSONDecoder? = JSONDecoder())
        -> DownloadResponseSerializer<T>
    {
        return DownloadResponseSerializer { _, response, fileURL, error in

    @discardableResult
    public func responseJSONDecodable<T: Decodable>(
        queue: DispatchQueue? = nil,
        decoder: JSONDecoder = JSONDecoder(),
        completionHandler: @escaping (DownloadResponse<T>) -> Void)
        -> Self
    {
