【发布时间】:2015-07-30 09:19:01
【问题描述】:
给定以下 JSON blob:
[
{
type: "audio",
title: "Audio example title",
},
{
type: "video",
title: "Video example title",
},
{
type: "audio",
title: "Another audio example title",
},
]
和两个 JSONModel 模型类(AudioModel、VideoModel)。是否可以让 JSONModel 在将 JSON 映射到模型时根据 type 属性自动创建其中一个模型类?
【问题讨论】:
-
不错!正是我想要的。干杯!
标签: ios objective-c jsonmodel