I’m trying to write an iOS application that’ll get data from a web server and display it as I want. I want to use JSON for this purpose. But as I’m absolutely new to web apps I’ve got no idea how I’m going to get the url to a certain feed. Now here’re the two big questions:
- How do I find the url to a feed provided by a web service? Is there a standard way or is it publicly or exclusively handed to the web service subscribers?
- Is the format they provide data in up to their preference (like XML or JSON)? I mean, do I choose my data parsing method according to the format the web service gives data in? So that if the feed is in XML format using
NSJSONSerializationclass makes no sense.
The common bits you’ll need to know are how to get to the web-service (NSURLRequest/NSURLConnection or any of the many asynchronous wrappers that are open source and available with a bit of searching), And how to deal with the the returned data – whether it’s in JSON (NSJSONSerialization, JSONKit) format or XML (NSXMLParser, libxml, or any of the many open source implementations that are available and described with a bit of searching)