RestKit フレームワークを使用して、Rest Web サービスに接続します。resultlistEntries が必要な場合、マッピングはどのように表示されますか。次のような JSON 応答があります。
{
"resultlist.resultlist": {
"paging": {
"numberOfHits": 69978,
"numberOfPages": 3499,
"pageNumber": 1,
"pageSize": 20
},
"resultlistEntries": [
{
"@numberOfHits": "69978",
"@realEstateType": "7",
"resultlistEntry": [
{
"@creation": "2013-01-15T16:36:00.000+01:00",
"resultlist.realEstate": {
"@id": "68014527",
"@xsi.type": "search:Office",
"calculatedPrice": {
"currency": "EUR",
"marketingType": "RENT_PER_SQM",
"priceIntervalType": "MONTH",
"value": 4.5
},
"commercializationType": "RENT",
"courtage": {
"hasCourtage": "YES"
},
"floorplan": "false",
"netFloorSpace": 155,
"price": {
"currency": "EUR",
"marketingType": "RENT",
"priceIntervalType": "MONTH",
"value": 697.5
},
"totalFloorSpace": 155
}
}
]
}
]
}
}
および次の RestKit コード
NSString *pathPattern = @"resultlist.resultEntries";
NSString *keyPath = @"resultEntry";
RKResponseDescriptor *responseDescriptor =
[RKResponseDescriptor responseDescriptorWithMapping:mapping
pathPattern:pathPattern
keyPath:keyPath
statusCodes:statusCodes];
結果は次のとおりです。
2013-01-15 16:49:00.102 RestKit_final[31840:c07]
Failed with error: No response descriptors match the response loaded.
どうしたの ?