AMSimpleJSONParser is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AMSimpleJSONParser"
You can always clone repository and just add files to your project
git clone https://github.com/Davarg/AMSimpleJSONParser.git
If you are looking for simple and lightweight approach for parsing JSON data - you found it. All you need to know class of model and JSON data.
@interface NestingLevelFour : NSObject
@property (strong) NSString* lastProperty;
@end
@interface NestingLevelThree : NSObject
@property (strong) NestingLevelFour* nestingLevelFour;
@end
@interface NestingLevelTwo : NSObject
@property (strong) NestingLevelThree* nestingLevelThree;
@end
@interface NestingLevelOne : NSObject
@property (strong) NestingLevelTwo* nestingLevelTwo;
@end
@interface AMTestModel : NSObject
@property (strong, setter=customSetterGreeting:) NSDictionary* greeting;
@property (strong) NestingLevelOne* nestingLevelOne;
@property (strong) NSArray* friends;
@property (strong) NSString* uniqId;
@end
..........................................................................
AMTestModel *testModel = [AMSimpleJsonParser parseJsonWithData:[testString dataUsingEncoding:NSUTF8StringEncoding] andWithModelClass:[AMTestModel class] andWithErrorObject:&error];
..........................................................................
Alex Makushkin, maka-dava@yandex.ru
AMSimpleJSONParser is available under the MIT license. See the LICENSE file for more info.