0
我已经给出JSON并且不能分析部分数据。这似乎解释到词典:RestKit JSON映射
{
"products": [
{
"id": 6796,
"title": "my title",
"description": "desc",
"code": "12345",
"valueType": "null",
"discounts": [
{
"minPrice": null,
"maxPrice": null,
"value": 20,
"avail": false
}
]
}
]
}
我使用的是最新版本的RESTKit的,但我不能正确discounts
下解析。
我RestKit设置:
responseMapping.addAttributeMappingsFromDictionary([
"id" : "id",
"code" : "code",
"title" : "title",
"valueType" : "valueType",
"description" : "desc",
"discounts.minPrice" : "minPrice",
"discounts.maxPrice" : "maxPrice",
"discounts.value" : "value",
"discounts.avail" : "avail",
])
但低于折扣的所有值总是返回零。我做错了什么?
谢谢我会尝试并更新你 – Anton 2015-02-24 22:37:25
它帮助了我。我已经将映射关系嵌套数组映射为分离的字典。 – Anton 2015-02-25 14:03:14