When I Post data to the Rest service on the Android end today, it is always unsuccessful. I checked a lot of information to know that the time format required for the Rest end to deserialize the json string must be UTC, and Date (12345678 + 0800) format. Android-side serialization method: copy the code // use Gson to serialize the Object to Jsonpublic static String toJson (object Object) {GsonBuilder builder = new GsonBuilder (); // do not convert the field builder without the @ Expose annotation. excludeFieldsWithoutExposeAnnotation (); // register the event builder for the Date type. registerTypeAdapter (Date. class, new UtilDateSerializer (); Gson gson = builder. create (); return gson. toJson (object);} class UtilDateSerializer implements JsonSerializer <Date >{@ Ove Rride public JsonElement serialize (Date src, Type typeOfSrc, JsonSerializationContext context) {// piece together the UTC time Type return new JsonPrimitive ("/Date (" + src. getTime () + "+ 0800 )/");}} copy code Android Post method copy code/*** send request via POST method ** @ param url * URL address * @ param params * parameter * @ return * @ throws Exception */ public String httpPost (String url, string json) throws Exception {String response = null; int timeoutConnection = 3000; int timeoutSocket = 5000; HttpParams httpParameters = new BasicHttpParams (); HttpConnectionParams. setConnectionTimeout (httpParameters, timeoutConnection); HttpConnectionParams. setSoTimeout (httpParameters, timeoutSocket); HttpClient httpClient = new DefaultHttpClient (httpParameters); HttpPost httpPost = new HttpPost (url); // Add http header information httpPost. addHeader ("Content-Type", "application/json"); ht TpPost. addHeader ("User-Agent", "imgfornote"); httpPost. setEntity (new StringEntity (json, "UTF-8"); HttpResponse httpResponse = httpClient.exe cute (httpPost); int statusCode = httpResponse. getStatusLine (). getStatusCode (); if (statusCode = HttpStatus. SC _ OK) {response = EntityUtils. toString (httpResponse. getEntity ();} else {response = String. valueOf (statusCode);} return response;} copy the code C # Rest server [O PerationContract] [WebInvoke (UriTemplate = "/yyxTest", ResponseFormat = WebMessageFormat. json, RequestFormat = WebMessageFormat. json)] string MensarTest (XCJCQK model); A summary of yourself, hoping to help people who encounter the same problem.