26

Swift is very strict about types, It’s good while explicit typing left us little chance to make mistakes. But while dealing with things that naturally implicit about types such as JSON, It’s painful.

SwiftyJSON makes it easy to deal with JSON data in Swift.

This example from the readme shows the mess caused from using NSJSON to handle parsing the user and name from JSON data even when using chaining:

While with SwiftyJSON you could use something like:

SwiftyJSON on GitHub

  1. bogus email address because I don't want to give it to you says:

    Library doesn’t work. Keep getting “doesn’t conform to protocol …” <- multiple errors…

    • Darrarski says:

      Hey, I will check it out when I get back from vacation. In the meantime consider opening an issue on project’s GitHub page. Swift is still in beta phase, it changes from version to version, that’s possible that something gets broken in the latest beta.

Leave a comment