RestKit 在 -objectLoader:didLoadObjects 中返回空数组(0 个对象):
我正在尝试使用 RestKit 的对象映射,但对象加载器只给我一个空数组。
我已经尝试过
RKLogSetAppLoggingLevel(RKLogLevelTrace);
,但仍然没有得到任何输出。
XML 如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<spaces type="array">
<space>
<name>Brain Tuner</name>
<default-showpage>Stream</default-showpage>
<created-at type="datetime">2010-11-06T02:00:33+07:00</created-at>
<is-commercial type="boolean">true</is-commercial>
<watcher-permissions type="integer">1</watcher-permissions>
<updated-at type="datetime">2011-08-12T14:07:55+07:00</updated-at>
<wiki-name>braintuner</wiki-name>
<team-permissions type="integer">2</team-permissions>
<is-manager type="boolean">true</is-manager>
<can-join type="boolean">false</can-join>
<id>qwerty</id>
<parent-id nil="true"></parent-id>
<public-permissions type="integer">0</public-permissions>
<description>Brain Tuner</description>
<is-volunteer type="boolean">false</is-volunteer>
<spaces-tools type="array">
<spaces-tool type="GitTool">
<created-at type="datetime">2011-07-08T09:44:43+07:00</created-at>
<watcher-permissions type="integer" nil="true"></watcher-permissions>
<url type="GitTool">giturl</url>
<team-permissions type="integer" nil="true"></team-permissions>
<id type="GitTool">asdfg</id>
<tool-id type="integer">123</tool-id>
<parent-id type="GitTool" nil="true"></parent-id>
<public-permissions type="integer" nil="true"></public-permissions>
<name type="GitTool">git2</name>
</spaces-tool>
<spaces-tool type="WikiTool">
<created-at type="datetime">2010-11-06T02:00:33+07:00</created-at>
<watcher-permissions type="integer" nil="true"></watcher-permissions>
<url type="WikiTool" nil="true"></url>
<team-permissions type="integer" nil="true"></team-permissions>
<id type="WikiTool">zxcvbn</id>
<tool-id type="integer">123</tool-id>
<parent-id type="WikiTool" nil="true"></parent-id>
<public-permissions type="integer" nil="true"></public-permissions>
<name type="WikiTool">Wiki</name>
</spaces-tool>
</spaces-tools>
</space>
</spaces>
I'm trying to use RestKit's object mapping, but the object loader just gives me an empty array.
I've tried
RKLogSetAppLoggingLevel(RKLogLevelTrace);
but I still don't get any output.
Here's what the XML looks like:
<?xml version="1.0" encoding="UTF-8"?>
<spaces type="array">
<space>
<name>Brain Tuner</name>
<default-showpage>Stream</default-showpage>
<created-at type="datetime">2010-11-06T02:00:33+07:00</created-at>
<is-commercial type="boolean">true</is-commercial>
<watcher-permissions type="integer">1</watcher-permissions>
<updated-at type="datetime">2011-08-12T14:07:55+07:00</updated-at>
<wiki-name>braintuner</wiki-name>
<team-permissions type="integer">2</team-permissions>
<is-manager type="boolean">true</is-manager>
<can-join type="boolean">false</can-join>
<id>qwerty</id>
<parent-id nil="true"></parent-id>
<public-permissions type="integer">0</public-permissions>
<description>Brain Tuner</description>
<is-volunteer type="boolean">false</is-volunteer>
<spaces-tools type="array">
<spaces-tool type="GitTool">
<created-at type="datetime">2011-07-08T09:44:43+07:00</created-at>
<watcher-permissions type="integer" nil="true"></watcher-permissions>
<url type="GitTool">giturl</url>
<team-permissions type="integer" nil="true"></team-permissions>
<id type="GitTool">asdfg</id>
<tool-id type="integer">123</tool-id>
<parent-id type="GitTool" nil="true"></parent-id>
<public-permissions type="integer" nil="true"></public-permissions>
<name type="GitTool">git2</name>
</spaces-tool>
<spaces-tool type="WikiTool">
<created-at type="datetime">2010-11-06T02:00:33+07:00</created-at>
<watcher-permissions type="integer" nil="true"></watcher-permissions>
<url type="WikiTool" nil="true"></url>
<team-permissions type="integer" nil="true"></team-permissions>
<id type="WikiTool">zxcvbn</id>
<tool-id type="integer">123</tool-id>
<parent-id type="WikiTool" nil="true"></parent-id>
<public-permissions type="integer" nil="true"></public-permissions>
<name type="WikiTool">Wiki</name>
</spaces-tool>
</spaces-tools>
</space>
</spaces>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论