// NSArray -> JSONNSArray*arr=[NSArrayarrayWithObjects:@"1",@"2b",@"3c",nil];//NSArray->JSONNSString*str=[arrJSONRepresentation];NSLog(@"%@",str);//归档NSArray->NSData//编码NSMutableData*data=[NSMutableDatadataWithCapacity:0];NSKeyedArchiver*arch=[[NSKeyedArchiveralloc]initForWritingWithMutableData:data];//编码[archencodeObject:arrforKey:@"arr"];//结束编码[archfinishEncoding];//解码NSKeyedUnarchiver*unarch=[[NSKeyedUnarchiveralloc]initForReadingWithData:data];NSArray*tmpArr=[unarchdecodeObjectForKey:@"arr"];[unarchfinishDecoding];NSLog(@"tmpArr:%@",tmpArr);