JSONCodable icon indicating copy to clipboard operation
JSONCodable copied to clipboard

JSONDecoder is ambiguous for type lookup

Open pronebird opened this issue 8 years ago • 2 comments

JSONDecoder is now a part of Foundation on iOS 11 and there is no way to use JSONDecoder anymore because there are now two of them. I have a code that extends both JSONDecoder and JSONEncoder and both throw an error on Xcode 9 beta:

'JSONDecoder' is ambiguous for type lookup in this context

It seems like JSONCodable will have to prefix its classes.

pronebird avatar Jul 03 '17 18:07 pronebird

Ideally, this library would become obsolete and we'd migrate to the new built-in Codable protocol in Swift 4. The only possible issue would be if we wanted to support multiple versions of iOS - it's possible the new API is available retrospectively since the Swift runtime is bundled with the application but I have yet to test this.

matthewcheok avatar Jul 03 '17 18:07 matthewcheok

I've fixed this in https://github.com/matthewcheok/JSONCodable/pull/82

emilwojtaszek avatar Aug 16 '17 12:08 emilwojtaszek