IOS network data download and JSON parsing, and ios data json Parsing
Introduction to network data download and JSON Parsing
In this article, I will introduce to you how to download data from the network, parse the JSON format data, and display the asynchronous download of data and images in ios.
Related Knowledge points
1. asynchronous download and encapsulation of nsulconnection
2. JSON format and JSON Format Parsing
3. data display and SDWebImage asynchronous display
Content
1. Introduction to basic network download knowledge
What is a network application?
Network applications have QQ maps... software that can run normally only when connected
Network Application Program Structure
Common network interface forms
Common Data Formats
The vast majority are JSON and XML.
General Interface Development Process
2. Use of nsulconnection
NSString synchronous download data
1 ViewController1 *vc1 = [[ViewController1 alloc] init];2 UINavigationController *nvc1 = [[UINavigationController alloc] initWithRootViewController:vc1];3 4 ViewController2 *vc2 = [[ViewController2 alloc] init];5 UINavigationController *nvc2 = [[UINavigationController alloc] initWithRootViewController:vc2];6 7 8 ViewController3 *vc3 = [[ViewController3 alloc] init];9 UINavigationController *nvc3 = [[UINavigationController alloc] initWithRootViewController:vc3];
3. JSON format description and formatting Tool
4. Implementation of a complete page (including the creation of a model and the use of SDWebImage)
Generally, the data downloaded from the network is text data. image data must be specially processed.