diff --git a/clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift b/clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift index c0db9bbfed..0c5e20dca4 100644 --- a/clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift +++ b/clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift @@ -91,7 +91,7 @@ extension Data: JSONEncodable { let jsonData = "{\"data\":\(selfString)}".data(using: .utf8) guard let jsonData, - let json = try? CodableHelper.jsonDecoder.decode([String: String].self, from: jsonData) else { + let json = try? CodableHelper.jsonDecoder.decode([String: AnyCodable].self, from: jsonData) else { fatalError("Could not decode from data holder: `{\"data\":\(selfString)}`") }