Created
September 8, 2015 17:10
-
-
Save steve21124/0cd62b06047d7a98a6ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void parseLargeModel(){ | |
// Reading from file | |
//NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"JSONData" ofType:@"json"]; | |
NSString *jsonPath = @"/Users/steve/junk2/MJExtension/MJExtensionExample/MJExtensionExample/JSONData.json"; | |
// Creating array of dictionary. | |
NSError *err; | |
NSArray *receivedJSONArray = [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfFile:jsonPath] options:0 error:&err]; | |
if(err) | |
NSLog(@"Error %@",err); | |
NSDate *startDate = [NSDate date]; | |
NSArray *largeModelArray = [LargeModel objectArrayWithKeyValuesArray:receivedJSONArray]; | |
NSDate *endDate = [NSDate date]; | |
/* | |
for (int i = 0; i < 10; i++) { | |
LargeModel *testModel1 = [largeModelArray objectAtIndex:i]; | |
NSLog(@"test Model 1 %@",testModel1.jcol10); | |
} | |
*/ | |
NSLog(@"%@",[NSString stringWithFormat:@"Successfully parsed %ld records in %f seconds.",[largeModelArray count],[endDate timeIntervalSinceDate:startDate]]); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface LargeModel : NSObject | |
@property (nonatomic, strong) NSString *jcol0; | |
@property (nonatomic, strong) NSString *jcol1; | |
@property (nonatomic, strong) NSString *jcol2; | |
@property (nonatomic, strong) NSString *jcol3; | |
@property (nonatomic, strong) NSString *jcol4; | |
@property (nonatomic, strong) NSString *jcol5; | |
@property (nonatomic, strong) NSString *jcol6; | |
@property (nonatomic, strong) NSString *jcol7; | |
@property (nonatomic, strong) NSString *jcol8; | |
@property (nonatomic, strong) NSString *jcol9; | |
@property (nonatomic, strong) NSString *jcol10; | |
@property (nonatomic, strong) NSString *jcol11; | |
@property (nonatomic, strong) NSString *jcol12; | |
@property (nonatomic, strong) NSString *jcol13; | |
@property (nonatomic, strong) NSString *jcol14; | |
@property (nonatomic, strong) NSString *jcol15; | |
@property (nonatomic, strong) NSString *jcol16; | |
@property (nonatomic, strong) NSString *jcol17; | |
@property (nonatomic, strong) NSString *jcol18; | |
@property (nonatomic, strong) NSString *jcol19; | |
@property (nonatomic, strong) NSString *jcol20; | |
@property (nonatomic, strong) NSString *jcol21; | |
@property (nonatomic, strong) NSString *jcol22; | |
@property (nonatomic, strong) NSString *jcol23; | |
@property (nonatomic, strong) NSString *jcol24; | |
@property (nonatomic, strong) NSString *jcol25; | |
@property (nonatomic, strong) NSString *jcol26; | |
@property (nonatomic, strong) NSString *jcol27; | |
@property (nonatomic, strong) NSString *jcol28; | |
@property (nonatomic, strong) NSString *jcol29; | |
@property (nonatomic, strong) NSString *jcol30; | |
@property (nonatomic, strong) NSString *jcol31; | |
@property (nonatomic, strong) NSString *jcol32; | |
@property (nonatomic, strong) NSString *jcol33; | |
@property (nonatomic, strong) NSString *jcol34; | |
@property (nonatomic, strong) NSString *jcol35; | |
@property (nonatomic, strong) NSString *jcol36; | |
@property (nonatomic, strong) NSString *jcol37; | |
@property (nonatomic, strong) NSString *jcol38; | |
@property (nonatomic, strong) NSString *jcol39; | |
@property (nonatomic, strong) NSString *jcol40; | |
@property (nonatomic, strong) NSString *jcol41; | |
@property (nonatomic, strong) NSString *jcol42; | |
@property (nonatomic, strong) NSString *jcol43; | |
@property (nonatomic, strong) NSString *jcol44; | |
@property (nonatomic, strong) NSString *jcol45; | |
@property (nonatomic, strong) NSString *jcol46; | |
@property (nonatomic, strong) NSString *jcol47; | |
@property (nonatomic, strong) NSString *jcol48; | |
@property (nonatomic, strong) NSString *jcol49; | |
@property (nonatomic, strong) NSString *jcol50; | |
@property (nonatomic, strong) NSString *jcol51; | |
@property (nonatomic, strong) NSString *jcol52; | |
@property (nonatomic, strong) NSString *jcol53; | |
@property (nonatomic, strong) NSString *jcol54; | |
@property (nonatomic, strong) NSString *jcol55; | |
@property (nonatomic, strong) NSString *jcol56; | |
@property (nonatomic, strong) NSString *jcol57; | |
@property (nonatomic, strong) NSString *jcol58; | |
@property (nonatomic, strong) NSString *jcol59; | |
@property (nonatomic, strong) NSString *jcol60; | |
@property (nonatomic, strong) NSString *jcol61; | |
@property (nonatomic, strong) NSString *jcol62; | |
@property (nonatomic, strong) NSString *jcol63; | |
@property (nonatomic, strong) NSString *jcol64; | |
@property (nonatomic, strong) NSString *jcol65; | |
@property (nonatomic, strong) NSString *jcol66; | |
@property (nonatomic, strong) NSString *jcol67; | |
@property (nonatomic, strong) NSString *jcol68; | |
@property (nonatomic, strong) NSString *jcol69; | |
@property (nonatomic, strong) NSString *jcol70; | |
@property (nonatomic, strong) NSString *jcol71; | |
@property (nonatomic, strong) NSString *jcol72; | |
@property (nonatomic, strong) NSString *jcol73; | |
@property (nonatomic, strong) NSString *jcol74; | |
@property (nonatomic, strong) NSString *jcol75; | |
@property (nonatomic, strong) NSString *jcol76; | |
@property (nonatomic, strong) NSString *jcol77; | |
@property (nonatomic, strong) NSString *jcol78; | |
@property (nonatomic, strong) NSString *jcol79; | |
@property (nonatomic, strong) NSString *jcol80; | |
@property (nonatomic, strong) NSString *jcol81; | |
@property (nonatomic, strong) NSString *jcol82; | |
@property (nonatomic, strong) NSString *jcol83; | |
@property (nonatomic, strong) NSString *jcol84; | |
@property (nonatomic, strong) NSString *jcol85; | |
@property (nonatomic, strong) NSString *jcol86; | |
@property (nonatomic, strong) NSString *jcol87; | |
@property (nonatomic, strong) NSString *jcol88; | |
@property (nonatomic, strong) NSString *jcol89; | |
@property (nonatomic, strong) NSString *jcol90; | |
@property (nonatomic, strong) NSString *jcol91; | |
@property (nonatomic, strong) NSString *jcol92; | |
@property (nonatomic, strong) NSString *jcol93; | |
@property (nonatomic, strong) NSString *jcol94; | |
@property (nonatomic, strong) NSString *jcol95; | |
@property (nonatomic, strong) NSString *jcol96; | |
@property (nonatomic, strong) NSString *jcol97; | |
@property (nonatomic, strong) NSString *jcol98; | |
@property (nonatomic, strong) NSString *jcol99; | |
@property (nonatomic, strong) NSString *jcol100; | |
@property (nonatomic, strong) NSString *jcol101; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "LargeModel.h" | |
@implementation LargeModel | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment