xzzz9097 / SpotifyKit

Swift client for Spotify Web API
MIT License
90 stars 17 forks source link

Use Swift's (De)Codable Interfaces instead of SwiftyJSON #1

Closed RobinThrift closed 7 years ago

RobinThrift commented 7 years ago

Since Swift 4 can now natively de- and encode JSON it might be a nice way to reduce dependencies, using the built in methods going forward. I'd be happy to help if you need assistance :)

xzzz9097 commented 7 years ago

Thanks for the input! I'm doing it right now in swift4 branch. Decodable structs are ready in SpotifyItems.swift, I've adapted 'find' function for it, now I have to do the same for the 'library' func and I'll be able to remove the SwiftyJSON initialization for the structs. Right now I'm also using SwiftyJSON to read/write application and token data to JSON files, but I've also added storing in a preference as an option so I may drop that altogether.

xzzz9097 commented 7 years ago

Most JSON initialisations for the items have been removed with 0e3db833aa57162423e64852e7871367cc64f0b1, being replaced by Decodable.

xzzz9097 commented 7 years ago

With e7aa010a91928df7d1deab8408468f61604e9df1, SwiftyJSON finally is no more! Next step will be Alamofire, I should just extend URLSession for the projects limited needs.