简体   繁体   English

我如何将ArrayList发送给Php并在PHP SCripts中使用volley接受它?有没有解决方案而无需转换为Json

[英]how can i send ArrayList to Php and accept it in PHP SCripts Using volley …is there any solution without converting to Json

@Override
protected Map<String, String> getParams() throws AuthFailureError {
    Map<String, ArrayList<String>> map = new HashMap<String,ArrayList<String>>();
                      map.put("title",interest);
              return map;
    }
};

I am trying this way but I know this is possible only for string not arraylist 我正在尝试这种方式,但我知道这仅适用于string而不是arraylist

String key = "phpArray[]";

JSONArray jsonArray = new JSONArray();
jsonArray.put(1);
jsonArray.put(2.3f);
jsonArray.put("Four");
jsonArray.put(true);

map.put(key, jsonArray.toString());

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM