Post

Replies

Boosts

Views

Activity

Reply to Swift.DecodingError.dataCorrupted and app crash with "The given data was not valid JSON.", underlyingError: Optional(Error Code=3840 "No value"
could you put this code just after "let finalData...". "if let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers), let jsonData = try? JSONSerialization.data(withJSONObject: json, options: .prettyPrinted) { print("\n---> response json: " + String(decoding: jsonData, as: UTF8.self)) } else { print("=========> json data malformed") }" and tell us what it produces.
Aug ’21