使用MJExtension 框架的这个方法 bjectWithKeyValues ,从json 转 model,其中model包含了其他的model,注意返回的格式:
NSDictionary *dict = @{
@"text" : @"是啊,今天天气确实不错!",
@"user" : @{
@"name" : @"Jack",
@"icon" : @"lufy.png"
},
@"retweetedStatus" : @{
@"text" : @"今天天气真不错!",
@"user" : @{
@"name" : @"Rose",
@"icon" : @"nami.png"
}
}
};
在开发中返回的json格式不正确,导致json转model失败
记录下