How to specify child objects type in an NSArray with Mantle

后端 未结 5 1597
無奈伤痛
無奈伤痛 2021-01-31 17:30

If I have a dictionary like

{
  name: \"Bob\",
  cars: [
    { make: \"ford\", year: \"1972\" },
    { make: \"mazda\", year: \"2000\" }
  ],
}

5条回答
  •  无人共我
    2021-01-31 18:09

    + (NSValueTransformer *)carsJSONTransformer {
        return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:CarModel.class];
    }
    

    Read more here

提交回复
热议问题