发送的json:{"abel":"6","act":"get","attrib":"5","did":"1","pid":"2","srv":"4","tpid":"3"}
数据发送的代码:
StringEntity entity = new StringEntity(json);
entity.setContentType("application/json");
entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded"));
// entity.setContentEncoding("UTF-8");
httppost.setEntity(entity);
接收到的数据格式:调用函数request.getParameterMap()
{{"abel":"6","act":"get","attrib":"5","did":"1","pid":"2","srv":"4","tpid":"3"}=[Ljava.lang.String;@5abf00}
期望得到的数据格式:
{"did":["1"],"pid":["2"],"tpid":["3"],"srv":["4"],"act":["get"],"attrib":["5"],"abel":["6"]}