TRON v0.2.0 Release Notes
-
โ Add support for any custom mapper to be used with TRON. Defaulting to
SwiftyJSON
.Examples:
Limitations
๐
ResponseParseable
andJSONDecodable
are now Self-requirement protocols with all their limitations. Apart from that, there are some other limitations as well:Subclasses
๐ Subclassing ResponseParseable requires explicit typealias in subclassed model:
class Ancestor: JSONDecodable { required init(json: JSON) { } } class Sibling: Ancestor { typealias ModelType = Sibling }
Discussion in mailing Swift mailing lists
Multiple custom mappers
๐ Current architecture does not support having more than one mapper in your project, because Swift is unable to differentiate between two ResponseParseable extensions on different types.
Arrays and CollectionTypes
๐ Currently, there's no way to extend CollectionType or Array with
JSONDecodable
orResponseParseable
protocol, so creating request with ModelType of array(APIRequest<[Foo],Bar>) is not possible.Blocking radars: https://www.openradar.me/23433955 https://www.openradar.me/23196859