我将问题代码缩减为:
RequestParams parameters = new RequestParams();
Map<Integer, HashMap> rows = new HashMap<Integer, HashMap>();
for (int i = 0; i < 2; i++) {
HashMap<String, String> row = new HashMap<String, String>();
row.put("test","row"+i);
rows.put(i, row);
}
parameters.put("rows", rows);
String url= Constants.pingbackURL;
AsyncHttpClient client=new AsyncHttpClient();
client.get(url, parameters, new TextHttpResponseHandler() {
@Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
}
@Override
public void onSuccess(int statusCode, Header[] headers, String responseString) {
}
});
我尝试添加HashMap后面的HashMap不在参数中(但是添加了一个简单的HashMap)。 是否通常将嵌套的HashMap发送到例如表格内容?我是否真的要通过json或其他类型发送此类数据?
提前致谢:)