How to specify child objects type in an NSArray with Mantle

后端 未结 5 1598
無奈伤痛
無奈伤痛 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:05

    +[NSValueTransformer mtl_externalRepresentationArrayTransformerWithModelClass:] is deprecated. The new API is +[NSValueTransformer mtl_JSONArrayTransformerWithModelClass:].

    After switching to the new API, the models can be initialized with the default initializers provided by, e.g., MTLJSONAdapter.

提交回复
热议问题