映射ios核心数据中的多个嵌入对象

时间:2015-10-04 18:50:03

标签: ios core-data xcdatamodel

假设我有像这样的json响应 -

{
"status": {
    "status": "Success"
},
"forecastDetails": [
    {
        "stageName": "Upside",
        "percent": 99.92,
        "amount": 16411537
    },
    {
        "stageName": "Commit",
        "percent": 0.08,
        "amount": 13843
    },
    {
        "stageName": "Won",
        "percent": 0,
        "amount": 0
    },
    {
        "stageName": "Strong Upside",
        "percent": 0,
        "amount": 0
    },
    {
        "stageName": "Submitted",
        "percent": 0,
        "amount": 0
    }
],
"totalAmount": 16425380,
"totalPercent": 100
}

将json映射到iOS Core Data时,我应该如何处理这种情况?如何设计模型并在它们之间建立关系?

0 个答案:

没有答案