JSON parsing using NSURLSession in iOS
In this tutorial , i will tell you about how to hit a web service in iOS using NSURL Session .
It is introduced in iOS 7 and it replaced the previous NSURLConnection .
Now , lets begin with the steps :
1) Create the NSUrlSessionConfigration and then create a session with that configuration. This allows you to create a session with specific functions set on it.
2) Create an NSUrlRequest so that you can set the request methods to hit the web service.
3) Create a JSON representation of the dictionary you will post to the web service.
4) Now code for this is :
JSON parsing using POST method
JSON parsing using AF Networking 3.0
Thats all about NSURLSession.
Thank you :)
Thank you so muchh !!! :) Worked for me thnks alot
ReplyDeleteYour welcome
ReplyDeleteKeep reading my blog for more tutorials !!!
Thanks for this beautiful post IOS. It is really good for the beginners and I also liked the post.
ReplyDeleteIOS Training in Bangalore
IOS Training in Marathahalli