假设我有像这样的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时,我应该如何处理这种情况?如何设计模型并在它们之间建立关系?