Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the best way to parse JSON format in iOS Swift? [closed]

Tags:

json

ios

swift

I have a project that polls a URL that returns a JSON format values. Any recommendations of whats the best way to parse the result for my iOS app?

like image 559
Alvin Reyes Avatar asked Oct 19 '22 05:10

Alvin Reyes


1 Answers

First of all there is no such thing as best way. If there was a best way, you will probably heard it or find it among top google hits.

You can make do-it-yourself with NSJSONSerialization. This what Apple provides, and it is merely the fastest and the hardest to use. It's not even that 'hard', it just get's complicated when JSON has manny sub-levels.

What I can recommend you is SwiftyJSON. It had minor(barely noticable in most apps) overhead but it's much more easier to use in Swift. A great example is found on raywenderlich site.

like image 53
hris.to Avatar answered Nov 15 '22 04:11

hris.to