开发者

POST with JSON in format DateTime

Im struggling a lot with how I can format a NSDate to POST it as JSON to RE开发者_StackOverflowST service .net. The accepted format is:

"Date":"\/Date(459842400000+0200)\/"

I have no problem with the response and to parse it to NSDate. I use JSONFramework for parsing.

Any suggestions?


Take a look at the NSDateFormatter and NSDate classes.

From your example it looks like you want to build a string with Date(Timestamp + TimeZone). There are two methods that do that, timeIntervalSince1970 (NSDate) and timeZone (NSDateFormatter).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜