Ask a question about json transmission and decoding. the ios client encodes the information into json and sends it to the server. The & nbsp; json string is {date: 2999-01-01 & nbsp; 00:00:00} & nbsp;, & nbsp; the received string is & nbsp; {date: 2999-01-01 & nbsp; 00:00:00} ask a question about json transmission and decoding.
The ios client encodes the information into json and sends it to the server. the json string is {"date": "2999-01-01 00:00:00"}, which is sent to the server through post.
When testing with a server, the received string is {\ "date \": \ "2999-01-01 00:00:00 \"}. then, the json_decode function can be used for normal decoding.
However, once I switched to a server, I found that the string received on this server was {\ "date \\\": \ "2999-01-01 00:00:00 \"}, the result of decoding with json_decode is wrong.
Why does the client transmit the same string differently on different web servers? the first case is what I need. how do I configure it?
Thank you!
------ Solution --------------------
$ Json = "{\" date \ ": \" 2999-01-01 00:00:00 \\\"}";
Var_dump (json_decode (stripcslashes ($ json); // remove the escape character