http://sizeed.blog.163.com/blog/static/9652545120111024917165/
试试看发送json到服务器上:
Reader r;
String url = "http://10.111.111.43:9000/XentivoCrm/services/VisitJSON";
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpost = new HttpPost(url);
InputStream data = null;
try {
ObjectMapper mapper = new ObjectMapper();
mapper.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
String json = mapper.writeValueAsString(mStringArray);
//I used jackson to create json, but built-in json.org will work
StringEntity se = new StringEntity(json);
httpost.setEntity(se);
httpost.setHeader("json", "application/json");
httpost.setHeader(HTTP.CONTENT_TYPE, "application/json");
HttpResponse response = httpClient.execute(httpost);
}