objective c - iOS7 is there a lightweight JSON to Object mapper, (NOT RestKit or NSJSONSerialization)? -
my current project uses afnetworking 2.2 , in general refuses compile when add restkit. is there way me equivalent of rkobjectmapping defined below other lightweight library? i'm talking taking json , turning custom value object, not dictionary or array.
google gson android comes mind, there ios?
what' i'm trying accomplish:
static rkobjectmapping* mapping = nil; +(rkobjectmapping*)objectmapping { if(mapping != nil) { return mapping; } //allows automatic unpacking of json payloads value objects //https://github.com/restkit/restkit/wiki/object-mapping //json - vo mapping = [rkobjectmapping mappingforclass:[myvo class]]; [mapping addattributemappingsfromdictionary:@{ @"label": @"label", @"icon": @"iconname", @"action": @"actionname", @"children": @"children" }]; return mapping; }
have tried nsjsonserialization (https://developer.apple.com/library/ios/documentation/foundation/reference/nsjsonserialization_class/reference/reference.html)? seems accomplish need. use whenever need parse in json format,
Comments
Post a Comment