Avatar
@swift-5.5.3 import Foundation let json = """ { "foo": "{\"key\": \"value\"}" } """.data(using: .utf8)! struct Body: Codable { var foo: String } let decoder = JSONDecoder() let decoded = try decoder.decode(Body.self, from: json) print(decoded) (edited)