Skip to content

Commit 7d08d1e

Browse files
authored
fix(swift): accept any type during json encoding (#3576)
1 parent 2b70f87 commit 7d08d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extension Data: JSONEncodable {
9191

9292
let jsonData = "{\"data\":\(selfString)}".data(using: .utf8)
9393
guard let jsonData,
94-
let json = try? CodableHelper.jsonDecoder.decode([String: String].self, from: jsonData) else {
94+
let json = try? CodableHelper.jsonDecoder.decode([String: AnyCodable].self, from: jsonData) else {
9595
fatalError("Could not decode from data holder: `{\"data\":\(selfString)}`")
9696
}
9797

0 commit comments

Comments
 (0)