The night has been very deep, the outside of the wind is still whining, my feet are cold and cold ... From 11:30 until now I have been testing why the correct JSON format string is still reported in the 400 error after it is uploaded to the server ...
There's no problem with the test before.
The thing is, my iOS after converting a class to a dictionary with afnetwork transfer to the server, before good now in the 400 error has been reported, check the program a few times, and finally only then, output the dictionary JSON string, with fiddler test server ... Had to flip out the previous tested JSON string ...
One by one comparison, the current JSON string than the original more than a time two ID value, and delete the retransmission, incredibly can be.
I first thought of yesterday's that pit, the JSON time format obtained from the server is "Posttime": "/date (1408943415760+0800)/" Like this, return to do not have to be like this ... If that's the case, that's why.
I passed in a "posttime": "/date (1408943415760+0800)/", the breakpoint at the point finally worked, and the incoming class was initialized normally. Let's see. To change the Posttime property of a class to a string type, is it possible to pass in the "2014-12-16 1:00:00", and again the test can pass the normal
That's why we found it. There are two kinds of solutions, one is to change the class's Posttime property to string, to read from the database, to string processing, to transfer the time also by string processing, it does not have to parse, to the app side directly with NSDateFormatter processing
What about the other way, when iOS comes in time format as a time interval (since 1970), hoping for a better solution
. NET time format and I was awake all night