quicktype
quicktype copied to clipboard
Default Swift output refers to undefined 'newJSONDecoder' value
- Sample: https://app.quicktype.io?share=nrNqOMPUlJztawoKIlwq
Default Swift output has a comment referring to newJSONDecoder, which is not defined.
// This file was generated from JSON Schema using quicktype, do not modify it directly.
// To parse the JSON, add this file to your project and do:
//
// let welcome = try? newJSONDecoder().decode(Welcome.self, from: jsonData)
import Foundation
// MARK: - Welcome
struct Welcome: Codable {
let greeting: String
let instructions: [String]
}
I just noticed this myself -- nearly 3 years later 😅
I just found this as it's the top result for "newJSONDecoder" on Google