matthewcheok / JSONCodable

Hassle-free JSON encoding and decoding in Swift
MIT License
602 stars 66 forks source link

Fix for Xcode 9.3+ #86

Closed igorkulman closed 5 years ago

igorkulman commented 6 years ago

Xcode 9.3 include Swift 4.1 with its owntoJSON() method. When I updated my project from Xcode 9.2 to 9.3 and rebuild the dependencies (I use Carthage) my project started failing on https://github.com/matthewcheok/JSONCodable/blob/master/JSONCodable/JSONString.swift#L19 because it was using the toJSON() from Swift 4.1. This PR fixes that by explicitly calling toJSON() from the library.