/
NSData+Json

NSData+Json

@implementation NSData (Json)

- (id)jsonObject {
    
    NSError *error;
    id object = [NSJSONSerialization JSONObjectWithData:self options:0 error:&error];
    if (error) {
        DLog(@"Failed to serialize json");
        return nil;
    }
    return object;
    
}

@end

Related content

IsEmpty
IsEmpty
More like this
NSString+MD5
NSString+MD5
More like this
How Best to Use Delegates and Notifications in Objective-C
How Best to Use Delegates and Notifications in Objective-C
More like this
NSMutableAttributedString
NSMutableAttributedString
More like this
Image Dimension
Image Dimension
More like this
UIColor to UIImage
UIColor to UIImage
More like this