restkit和iso date [英] restkit and iso date
问题描述
我要恢复的iso日期字符串是2011-,因此我无法从我的json api / mongodb中解析一个iso日期。 11-15T04:00:00Z,它不会转换成我的对象中的nsdate,显示为null。
如果我无法格式化,推荐的工作是什么我的日期字符串,服务器端在api?
在Google群组中查看此信息
http://groups.google.com/group/restkit / browse_thread / thread / 5ffaa4626209881
看起来你必须创建自己的日期格式化程序并将其添加到对象映射器
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?
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
这篇关于restkit和iso date的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!