Introduction to iOS Web data download and JSON parsing
In this paper, the author mainly introduces how iOS uses nsurlconnection to download data from the network, how to parse the downloaded JSON data format, and how to display the data and images of the asynchronous download display.
The knowledge points involved:
1.NSURLConnection Asynchronous Download and encapsulation
2.JSON format and JSON format parsing
3. Data display and use Sdwebimage to display images asynchronously
Content
1. Introduction to Network Download basics
What is a Web application?
Applications that need to be operated via networking
The program structure of the network application?
c/S structure: client/server
Common form of network interface?
What are the common data formats?
70% of the data is in JSON format, 25% of the data is in XML format, and the rest is data in other formats.
The general process of interface development?
In the interface development process, to implement an interface, first need to clear what to do, prepare the interface, prepare the interface material, prepare interface network interface. Second, download the data, through Nsurlconnection+url, parse (json/xml) data, can download specialized parsing tools such as Jason. Then build the data model. Finally, the view is used for data presentation.
2.NSURLConnection use
3.JSON format description and Formatting tools
4. Implementation of a completion page (including model creation, sdwebimage use)
Insert
iOS Web data download and JSON parsing