今天拿到后台返回的一组数据,解析成一个数组的模型,记录一下。
先说数据吧
@"channels" = @"[
{\"endTime\":57599000,\"feeRate\":0.0048,\"feeType\":0,\"id\":\"2064725576104804353\",\"integralType\":0,\"maxAmount\":2000000,\"minAmount\":1000},
{\"endTime\":57599000,\"feeRate\":0.0055,\"feeType\":0,\"id\":\"2062592141647151101\",\"integralType\":0,\"maxAmount\":2000000,\"minAmount\":1000},
{\"endTime\":57599000,\"feeRate\":0.0062,\"feeType\":0,\"id\":\"2064725576104804352\",\"integralType\":0,\"maxAmount\":2000000,\"minAmount\":1000},
{\"endTime\":57599000,\"feeRate\":0.0056,\"feeType\":0,\"id\":\"1088087885992689664\",\"integralType\":0,\"maxAmount\":2000000,\"minAmount\":1000}
]";
解析
NSData * decryptData =[[responseDic objectForKey:@"channels"] dataUsingEncoding:NSUTF8StringEncoding];
NSMutableArray * bankArr = [NSJSONSerialization JSONObjectWithData:decryptData options:NSJSONReadingMutableContainers error:nil];
不知道MJExtension能否解析,如果有知道的童鞋,希望能在下面留言,多多指教🙏
网友评论