【发布时间】:2015-02-17 15:38:28
【问题描述】:
我从 Rest API 请求数据,它的数据在响应客户端之前被编码。我的响应对象是
{homes = "[{\"info\":{\"id\":\"001\",\"description\":\"\",\"posted_date\":\"2015-02-12 09:42:31\"}},{\"info\":{\"id\":\"002\",\"description\":\"test\",\"posted_date\":\"2015-02-12 09:42:31\"}}]";}
我想使用 Objective-c 来解码或将此对象转换为这种格式:
{
homes = (
{ info = { id = 001; "description":""; "posted_date" = "2015-02-12 09:42:31";}};
{ info = { id = 002; "description":"test"; "posted_date" = "2015-02-12 09:42:31";}};
);
}
请给我一些想法。
提前致谢
【问题讨论】:
-
请做一些基本的搜索。在此处或通过 Google 进行快速搜索会发现用于在 Objective-C 中解析 JSON 数据的资源数量之多。
-
现在是 asurd_number += 3
标签: objective-c json