restkit and iso date

风流意气都作罢 提交于 2019-12-24 11:14:24

问题


I'm having trouble parsing an iso date from my json api/mongodb using rest kit.

The iso date string I'm getting back is "2011-11-15T04:00:00Z" whichdoesn't get converted to an nsdate in my object, showing as null.

What's the recommended work around if I can't format my date string, server side at the api?


回答1:


Saw this post in google groups

http://groups.google.com/group/restkit/browse_thread/thread/5ffaa4626209881

Looks like you would have to create your own date formatter and add it to the object mapper



来源:https://stackoverflow.com/questions/7811607/restkit-and-iso-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!