Posts

Showing posts with the label json data

How To Parse JSON Data In iOS (Swift 3 + Xcode 8) ?

Image
JSON Data Parsing In iOS Hi, In this post, I'll show you how to fetch and parse JSON data from an URL in your iOS app. First, what is JSON?? JSON stands for "JavaScript Object Notation". JSON is the most popular and light weight format for data-interchange.  In this app, we’ll use http://fixer.io website's API to get the latest currency exchange rates and use them in our iOS app.  So, let’s start and see how to parse JSON data in iOS. First of all, open your Xcode and create a Single View Application.  Give some name to your project and make sure to choose Swift as the language. Click Next. For this post, we don’t need to work in Storyboard. So just open your ViewController.swift file and write following lines of code in your viewDidLoad() method:      override func viewDidLoad() {         super . viewDidLoad ()                  //Give your...