AndroMasta AndroMasta - 1 year ago 82
Swift Question

Swift 3 json parsing library suggestion

I'd like to parse some JSON data with swift but its very difficult for me to do because of optionals. How to do this?

I tried using Standard libraries to do this

Answer Source

Try to use SwiftyJSON library

With SwiftyJSON all you have to do is:

let json = JSON(data: dataFromNetworking) if let userName = json[0]["user"]["name"].string { //Now you got your value }

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download