Skip to content

Commit

Permalink
fix(swift): accept any type during json encoding (#3576)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Aug 22, 2024
1 parent 2b70f87 commit 7d08d1e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`")
}

Expand Down

0 comments on commit 7d08d1e

Please sign in to comment.