// // NSArray+Extra.m // FirstLink // // Created by ascii on 16/5/16. // Copyright © 2016年 FirstLink. All rights reserved. // #import "NSArray+Extra.h" @implementation NSArray(Extras) - (NSString *)json { NSError *error; NSData *data = [NSJSONSerialization dataWithJSONObject:self options:NSJSONWritingPrettyPrinted error:&error]; if (!error) { return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; } return nil; } @end